Search Engine: Elastic

Article ID: 115773, created on Mar 21, 2013, last review on Dec 28, 2017

  • Applies to:
  • Plesk Automation 11.5


To process HTML pages through PHP, it is important to first determine which mode PHP is running in, and specifically, whether it is running through the Apache module as a CGI or FastCGI application. This can be done by looking at the hosting settings of the domain by clicking on the domain name on the Websites & Domains tab in the control panel.

Next, choose one of following sections, depending on the PHP execution mode, and put it in the conf/vhost.conf file in the virtual host directory. Then reconfigure the web server using this command:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

PHP is running as an Apache module:

<IfModule mod_php5.c>
   AddHandler php5-script .php .html .htm
   AddType text/html .php .html .htm

PHP is running as a FastCGI application:

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

PHP is running as a CGI application:

<Files ~ (\.html)>
    SetHandler None
    AddHandler php-script .html
    Options +ExecCGI
    allow from all

If a change is required on a global scale, then the virtual host configuration templates can be adjusted and the sections above put into web server configuration files automatically. For more information, check KB article #115277.

Regarding instructions for processing HTML files by PHP for Plesk for Windows, please contact Plesk support

33a70544d00d562bbc5b17762c4ed2b3 e0aff7830fa22f92062ee4db78133079 caea8340e2d186a540518d08602aa065

Email subscription for changes to this article
Save as PDF