Apache 2.4 on Amazon Linux (roughly equivalent to RH 7, I suppose), with various versions of PHP.
I'm having an issue trying to get PHP CGI scripts running on my webserver when SSL is enabled. For example:
http://52.example.com/phpinfo.php gives the proper output, but when I enable SSL (i.e, https://52.example.com), I get a 404 error:
The requested URL /php-fcgi/php-cgi-5.2.17/phpinfo.php was not found on this server. Here are the contents of the 52.conf file in my /var/www/vhosts directory:
 <VirtualHost *:443> ServerName 52.example.com DocumentRoot /var/www/vhosts/52 <Directory "/var/www/vhosts/52/"> AddHandler php-cgi .php Action php-cgi /php-fcgi/php-cgi-5.2.17 <FilesMatch "\.php$"> Options ExecCGI SetHandler php-cgi </FilesMatch> </Directory> where site.conf is a virtual host definition.
And here are the contents of the php-cgi-5.2.17 file:
#!/bin/sh version="5.2.17" PHPRC=/opt/phpfarm/inst/php-${version}/lib/php.ini export PHPRC PHP_FCGI_CHILDREN=3 export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=5000 export PHP_FCGI_MAX_REQUESTS # which php-cgi binary to execute exec /opt/phpfarm/inst/php-${version}/bin/php-cgi As you can probably tell, I'm using PHPFarm to server different versions of PHP to different subdomains.
Note that I don't know for sure that SSL is the cause of my grief, but it seems awfully suspicious.
If anyone has any thoughts or ideas I would be eternally grateful. Thanks in advance.