Article 501V7 Need help to config Apache 2.4 to parse PHP code contained in files with .HTML extension

Need help to config Apache 2.4 to parse PHP code contained in files with .HTML extension

by
guardian46w
from LinuxQuestions.org on (#501V7)
My personal server crashed and forced me to upgrade all of my EOL software. I cannot now get the Apache config'd so an HTML file, with embedded PHP, is parsed as a PHP file.

CentOS version 8.1.1911
Apache version 2.4.37
PHP version 7.2.11

I have tried adding these to the httpd.conf file - with no luck:

AddHandler application/x-httpd-php .html .php
AddHandler application/x-httpd-php7 .html .php
AddHandler application/x-httpd-php72 .html .php

phpinfo().php works fine and the files I have that are .php display correctly but the .html files do not run the embedded php. I have dozens of .html files that have <?php include ***** ?> statements for adding the header, menu, and footer to the pages. I really don't want to rename them all to .php.

Any help greatly appreciated. Thankslatest?d=yIl2AUoC8zA latest?i=9bwF2hE1G-w:PoocUx2Ak_Y:F7zBnMy latest?i=9bwF2hE1G-w:PoocUx2Ak_Y:V_sGLiP latest?d=qj6IDK7rITs latest?i=9bwF2hE1G-w:PoocUx2Ak_Y:gIN9vFw9bwF2hE1G-w
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments