Search

Language:  
Search for:

Available article translations:

[HOWTO] How to process files with .html extension through PHP (Linux)

APPLIES TO:
  • Parallels Plesk Automation 11.5

Answer

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
</IfModule>

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
    </Files>
</IfModule>

PHP is running as a CGI application:

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

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.

Instructions for processing HTML files by PHP for Plesk for Windows are available in KB article #115774.




b2231b0275a8ff26de8dfbae19ed2984 b315de483b3ce496b93860f954cd3118 caea8340e2d186a540518d08602aa065

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No
 
 
 
 
 
 
Desktop Virtualization
- Parallels Desktop 9 for Mac
- Parallels Transporter
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop for Mac Enterprise Edition
- Parallels Management-Mac for Microsoft SCCM
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0 Beta
- Parallels Virtuozzo Containers
Automation
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification