I have a legacy web site that I would like to host on a Plesk Onyx 17.8 web server. The web site is running fine on PHP 5.3 FastCGI.
The problem is that it is using the old fashioned ".php4" file extension. And since it is a legacy app I didn't develop myself, and is poorly developed, it is not an option to migrate the whole code base from .php4 to .php file extension.
The web site is configured in Plesk with the default architecture, with Nginx as front-end reverse proxy, and Apache as a back-end, serving php applications with FastCGI.
Which directives should I add to Apache and/or nginx to actually send the php4 files to the php engine ?
I know this old app is running fine with the PHP 5.3 FastCGI engine, it is currently hosted on a Windows 2012 / IIS 7.5 / PHP5.3 stack, so the only thing I need is to tell the web server to accept the .php4 file extension. I don't need to install any PHP4 runtime.
not sure that it will work. You can try to do following
Domains > example.com > Apache & nginx Settings
Index files - choose "Enter custom value" and enter index.php4
For "Additional directives for HTTP" and "Additional directives for HTTPS" set:
<IfModule mod_fcgid.c>
<Files ~ (\.php4$)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php4
Options +ExecCGI
</Files>
</IfModule>
"Proxy mode" must be enabled.