PHP pages are downloaded if PHP-FPM is used

Created:

2016-11-16 13:11:15 UTC

Modified:

2017-08-08 13:17:26 UTC

0

Was this article helpful?


Have more questions?

Submit a request

PHP pages are downloaded if PHP-FPM is used

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

All PHP-FPM versions are not working on the server. PHP pages are downloaded instead of parsing with PHP engine.

Cause

Server misconfiguration.

Resolution

  • Make sure that domain configuration file /var/www/vhosts/system/example.com/conf/httpd.conf contain section:

    <IfModule mod_proxy_fcgi.c>
    <Files ~ (\\.php$)>
    SetHandler proxy:unix:///var/www/vhosts/system/example.com/php-fpm.sock|fcgi://127.0.0.1:9000
    </Files>
    </IfModule>
  • Check if proxy_fcgi module is enabled:

    plesk sbin httpd_modules_ctl -s | grep proxy_fcgiproxy_fcgi on

  • If there are custom templates:

    ls -lad /usr/local/psa/admin/conf/templates/custom
    drwxr-xr-x 5 root root 4096 May 20 2015 /usr/local/psa/admin/conf/templates/custom
    1. Review custom templates or rename it:

      # mv /usr/local/psa/admin/conf/templates/custom /usr/local/psa/admin/conf/templates/custom_bk
    2. Reconfigure domain or all domains:

      # plesk sbin httpdmng --reconfigure-domain example.com
      # plesk sbin httpdmng --reconfigure-all
  • Ensure that there is no problems in packages dependencies:

    # apt-get check

    OR

    # yum check
Have more questions? Submit a request
Please sign in to leave a comment.