Author Topic: i canīt run php as html files  (Read 446 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
i canīt run php as html files
« on: January 26, 2019, 06:34:17 PM »
Hello

I have is php switcher 7.2.15
also compiled the same verion 7.2.15 in php_selector 2

I have a site using html files but with php code.
Normally, in all servers with cpanel and other panels i do this with the addhanlder line in htaccess like this :

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

not working here.. the files with html extension and php code display the code.

Iīve tried everything.. i set at "webserver domains conf" for the domain : apache + nginx php-cgi
i modified this part in the domain.conf under nginx (/etc/nginx/conf.d/vhosts/domain.com.conf)

 location ~ .*\.(php|jsp|cgi|pl|py)?$ {
                proxy_pass http://1.1.1.1:8181;
                include proxy.inc;
        }

for this :

 location ~ .*\.(php|html|jsp|cgi|pl|py)?$ {
                proxy_pass http://1.1.1.1:8181;
                include proxy.inc;
        }


then restarted Nginx and apache

nothing happens :(

any help ?