• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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