ISPconfig 3.2.10p2 PHP-FPM parse .htm and html files

Discussion in 'Installation/Configuration' started by andyb2000, Aug 7, 2023.

  1. andyb2000

    andyb2000 New Member

    Hi all,
    Just upgraded and now using PHP-FPM from my ancient server, however something I've not worked out is how to parse .htm and .html files as PHP. I'm using PHP-FPM and previously I added into ISPConfig WEBSITE > OPTIONS > Apache Directives:
    AddType application/x-httpd-php .html .htm
    Which worked. However looking at the PHP-FPM config it is a lot more complex and this handler isn't working, so the PHP code in my .htm and .html files are being displayed in clear text.
    How would I add this handler to newer ISPConfig and PHP-FPM implementations please?
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    This isn't easily possible in PHP versions greater than 5.X. Best advice is to just use .php extension for your files, as it does not matter.
    But if you want to try, this user seemed to figure out a way to make it work. I don't know if thats a good idea or if it even works.

    andyb2000 likes this.
  3. andyb2000

    andyb2000 New Member

    Thanks, yes I'd sort of come to the same conclusion but wanted to see if anyone had a quick solution.
    I'm lucky in it's only one site and a handful of files so I'll just change my code to use the .php extension.

    Thanks for the info :)
    ahrasis and till like this.

Share This Page