I am running Caddy with PHP, which defaults to version 7.0.7 as almost all my sites use it. However, for a particular site I need to run version 5.6. How can I run a different version of PHP with Caddy, specifically from a different folder?
I have PHP 7.0.7 installed in C:\Caddy\php and 5.6 in C:\Caddy\php-5.6.23, and my basic Caddy setup is this:
But I can run these two instances as spawned by Caddy, as I do currently? Each of the sites in my Caddyfile use a configuration like above, and each spawns an instance of CGI /FastCGI. The ports I get, but how would I set which port leads to which instance?
Also, should I not be spawning a PHP-instance for each site? I guess that it might be superfluous.
Ahh, then I can remove several startups of php-cgi from the Caddyfile. Each PHP version is released with its own php-cgi.exe, but I’m unsure of how to make each site in the Caddyfile use a specific one rather than the “general one” which is started from environment paths.
The PHP 7.0.7 php-cgi is registered in the environment paths, and thus startup php-cgi always spawns this available for all sites regardless of host name or port.