Add to Favourites Add to Favourites    Print this Article Print this Article

Enabling PHP FastCGI application produces 403 Forbidden error

Symptoms
In Parallels Plesk Panel 9.0 some Web Application is installed to document root (/) on domain DOMAIN.TLD through {Domains -> DOMAIN.TLD -> Web Applications}.

When set PHP to run as FastCGI application for the domain {Domains -> DOMAIN.TLD -> Web Hosting Settings -> PHP support} the domain generates error 403 when access it via http://DOMAIN.TLD or http://DOMAIN.TLD/index.php.

Forbidden:
You don't have permission to access /index.php on this server.
And the following error is shown in domain's apache log $HTTPD_VHOSTS_D/DOMAIN.TLD/httpdocs/statistics/logs/error_log:

[Thu Feb 19 08:46:29 2009] [error] [client 123.123.123.123] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: $HTTPD_VHOSTS_D/DOMAIN.TLD/httpdocs/index.php

Resolution:
The problem is caused by rewrite engine that is enabled for the domain during installation of the Web Application.

$HTTPD_VHOSTS_D/DOMAIN.TLD/httpdocs/.htaccess
--

RewriteEngine on

To resolve the problem you should switch off rewrite engine in .htaccess (RewriteEngine off).

The problem is fixed in next update of Parallels Plesk Panel that is released after version 9.2. It allows to have rewrite engine enabled when PHP runs as FastCGI application.

Hotfix for version 9.0.1 is attached. To install it you should download the archive and unpack it with tar -zxf.
In resulted directory find file websrvmng appropriate to your operating system and architecture.
Replace existent file websrvmng with one you have found.
Location of the file is /usr/local/psa/admin/sbin/websrvmng for RedHat family and /opt/psa/admin/sbin/websrvmng for Debian family.

Do not forget to correct ownership and permissions. It should be root:psaadm, 550.
You may correct permissions with commands chown and chmod. For example:

~# chown root:psaadm /usr/local/psa/admin/sbin/websrvmng
~# chmod 550 /usr/local/psa/admin/sbin/websrvmng

After the hotfix is installed you should re-generate Apache configuration files for all domains. Do that with the command below.

~# /usr/local/psa/admin/sbin/websrvmng -av

Was this answer helpful?

Also Read