I have a domain that marketing says they just have to have php running on pages with the .html extension. I am moving the site to virtualmin and cann’t get it to work with mod_fcgid. On the current server I just added these lines to my .htaccess file and things worked perfectly.
RemoveHandler .html .htm
AddType application/x-httpd-php .html .htm
.htaccess files are quite limited, by default, as there are potential security issues opened up by broader override options. You can set AllowOverride to permit FileInfo and Options (or just “all”, since those are the potentially dangerous ones anyway…might as well go whole hog), and restart Apache, and it’ll respect those directives.
Or, probably safer, something like this in the httpd.conf should also do the trick:
Find the bit where the existing fcgid-script rules are and add them there…and, obviously, replace the "domain" bit with the actual directory where this virtual server lives.
I tried AllowOveride and AddType application/x-httpd-php .html.
I also tried putting the AddHandler stuff in my .htaccess. Neither one worked for me so I changed it in httpd.conf and it works.