I'm trying to set php5.6.23 as fast CGI on my server for using php7 as main version
but in one of my domain, I get this error :
The requested URL / was not found on this server.
here is my vhost conf :
ScriptAlias / /usr/lib/cgi-bin
DocumentRoot "/home/ue4xxxx/www"
<Directory "/home/ue4xxxx/www">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php-cgi-5.6.23
<FilesMatch "\.php*">
SetHandler php-cgi
</FilesMatch>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/ue4/error.log
CustomLog ${APACHE_LOG_DIR}/ue4/access.log combined
I have the php cgi bin locate at /usr/lib/cgi-bin
and I want to use the the file in the vhost root /home/ue4xxxx/www
UPDATE: After following some suggestions, the vhost conf is now:
<VirtualHost *:80>
ServerAdmin postmaster@ue4-xxxx.tld
ServerName ue4-xxxx.tld
ServerAlias ue4-xxxx.tld
ScriptAlias /cgi-bin /usr/lib/cgi-bin
DocumentRoot "/home/ue4xxxx/www"
<Directory "/home/ue4xxxx/www">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php-cgi-5.6.23
<FilesMatch "\.php">
SetHandler php-cgi
</FilesMatch>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/ue4/error.log
CustomLog ${APACHE_LOG_DIR}/ue4/access.log combined
</VirtualHost>
After these changes, I get a 404 error:
The requested URL /cgi-bin/php-cgi-5.6.23/index.php was not found on this server