I am leasing a Unix (Ubuntu) virtual server.
It was recently compromised and so my ISP (WebFusion) removed all my sites and re-installed the server. It is my task to re-build all the websites it contained.
They replaced the old Plesk 9.4 with 11.5, and now I find .htaccess files are ignored, and so I must find another way to direct the server to push .htm files through PHP.
My test for this is done with two files called phpt.php and phpt.htm. Both contain simply
<?php echo "hello" ?>
The .php file works, but the .htm does not.
There is a place in the panels which seems designed to do this. In “Websites & Domains”, if I click “Web Server Settings”, I can see two areas where I can add “Additional directives”.
The comments say I should use httpd.include syntax, and if I research that I see I can say things like “AddHandler cgi-script .cgi”.
So I added “AddHandler php-script .htm” an also “AddHandler php5-script .htm”, saved and restarted the server.
This doesn’t work. Research suggests it’s because nginx is now included with Apache and they interact in such a way as to break this. Great.
So I removed those directives and researched it some more and found this article http://kb.sp.parallels.com/en/115773 which says I should make a “conf” directory under the domain root and place a file in it called “vhost.conf” which should contain (for CGI application implementations of PHP like mine):
<Files ~ (.html)>
AddHandler php-script .html
allow from all
I changed this to replace .html with .htm (removing the l) in both locations. I then restarted the server again, but it still doesn’t work.
So at this point I’m at a loss and I would appreciate any help anyone might be able to offer.