I have a client who needs hosting for an old cms version that needs PHP 4.x.x. I know they will have to upgrade eventually, but I need to keep the site up in the meantime. I have managed to compile and install php 4.4.9 as a cgi and I try to configure Apache to use this version for this virtual host only.
The problem is, it just won't work. I've read a lot about AddHandler and AddType and tried to apply it in the VirtualHost config as well as in a .htaccess file without success.
This is my configuration:
- Code: Select all
<VirtualHost 12:34:56:78:80>
ServerName www.domain.com
DocumentRoot /home/user/public_html
ErrorLog /home/user/log/error.log
CustomLog /home/user/log/access.log combined
<Directory /home/user/public_html>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from All
</Directory>
DirectoryIndex index.html index.php
ScriptAlias /php4cgi/ "/var/www/php4/"
<directory "/var/www/php4">
AllowOverride None
Options +ExecCGI +FollowSymLinks
Order allow,deny
Allow from all
</directory>
Action php4-cgi /php4cgi/php
AddType php4cgi .php
AddHandler php4cgi .php
</VirtualHost>
Can someone help me with this?
Also:
- I tried to apply AddType/AddHandler to the extension .php4 and that worked. But I don't think I can rename all of the php files and all the references. I don't know why it doesnt work with .php
- I also tried using RemoveHandler and RemoveType with no luck.
Edit: Antworten auf Deutsch sind auch willkommen