• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Question Plesk index.html php not working

NakHyun Kim

New Pleskian
Hello.

It's my first time using Plesk.

I have a problem.

Php grammar does not work in index.html

No matter how hard I looked, I couldn't find a definite solution.

Have a nice day.
 
Create a text file named ".htaccess" in the document root directory of your website. Enter the following line. If an .htaccess-file already exists, add the line to that file:


AddHandler php-script .html .htm


By using this line the web server knows that it ought to parse .html and .htm files for PHP code and that it ought to interpret <?php…?>-segments as PHP commands. Please note that this .htaccess command will work on Bitpalace shared hosting web space, but may not work on web space of other providers.


Then add the following lines to the "Additional configuration directives" section with the PHP icon in the webspace control panel:


[php-fpm-pool-settings]
security.limit_extensions = .php .phar .html .htm .inc


Add the following additional lines to the "Additional directives for HTTP" and "Additional directives for HTTPS" sections in the "Apache and nginx settings" icon in the webspace control panel:


If you are using the PHP-FPM interface (recommended):


<IfModule mod_proxy_fcgi.c>
<Files ~ .(?i:inc|html|htm)$>
SetHandler proxy:unix:///var/www/vhosts/system/example.com/php-fpm.sock|fcgi://127.0.0.1:9000
</Files>
</IfModule>


(Replace „example.com“ by your domain name.)


If you are using the PHP-FastCGI interface:


<IfModule mod_fcgid.c>
<Files ~ (\.htm$)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .htm
Options +ExecCGI
allow from all
</Files>
</IfModule>


<IfModule mod_fcgid.c>
<Files ~ (\.html$)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .html
Options +ExecCGI
allow from all
</Files>
</IfModule>

The changes need a webserver reload/restart to become active.
 
Back
Top