I have a folder running a PHP application configured in IIS. Here’s the current setup:
- Site Name: Original Website
- PHP Manager > PHP Version: 7.0
- Bindings: * on ports 80 and 443
- Handler Mappings: First handler is PHPv7.0 using FastCGI
Now, I want to run the same application folder using PHP 8, accessible via a different domain (e.g., php8.example.com.local
). The goal is to test the app on PHP 8 while keeping the original running on PHP 7.0.
Here’s what I tried:
Created a new IIS website (PHP 8 Website
) pointing to the same folder.
Set bindings to only php8.example.com.local
.
Changed the PHP version to 8 in PHP Manager for the new site.
When I change the PHP version in the new site, the original site also switches to PHP 8 (and vice versa). It seems the PHP version setting is global, even though they are separate sites.
I also tried modifying Handler Mappings at the site level to switch only the PHP 8 Website to use PHPv8.0, but that also affects the original site.
How can I configure IIS to serve the same application folder using two different PHP versions, based on the domain name?