Can you please help us to execute php in html file. As we are using Apache 2.4 , php-fpm on centos 6.9(64 Bit). We have used below code to execute php as html but I think it is not correct.
I have added below code in /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf file:
# 2.4.10+ can proxy to unix socket # SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost/"
# Else we can just use a tcp socket:
SetHandler "proxy:fcgi://127.0.0.1:9000"
# 2.4.10+ can proxy to unix socket # SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost/"
# Else we can just use a tcp socket:
SetHandler "proxy:fcgi://127.0.0.1:9000"
Now I can execute php in htm file but every htm file render as php. So any body can help to resolve this issue.
We want to execute php in html file through handler.