Plesk sub domain php downloading pages


There seems to be a bug in plesk where the php in sub domain will not work and in main domain it works.!!. The below are the steps to overcome it.

Open the subdomain’s conf folder at /var/www/vhosts/$$subdomainname/conf

cd /var/www/vhosts/$$subdomainname/conf
vi vhost.conf

and add the below config, make sure you change the $ to your domain name and $subdomainname to your subdomain name.

<Directory /var/www/vhosts/$$subdomainname>

<IfModule mod_perl.c>
<Files ~ (\.pl$)>
SetHandler perl-script
PerlHandler ModPerl::Registry
Options ExecCGI
allow from all
PerlSendHeader On
<IfModule sapi_apache2.c>
php_admin_flag engine on

<IfModule mod_php5.c>
php_admin_flag engine on
<IfModule mod_python.c>
<Files ~ (\.py$)>
SetHandler python-program
PythonHandler mod_python.cgihandler
<IfModule mod_fcgid.c>
<Files ~ (\.fcgi)>
SetHandler fcgid-script
Options +FollowSymLinks +ExecCGI
Options -Includes +ExecCGI


Then execute the below two scripts

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=$ 
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

This entry was posted in linux.

Leave a Reply

Protected by WP Anti Spam