server vhost.conf

useful & most used (often forgotten) commands

modifying the vhost.conf

vhost.conf location
/var/www/vhosts/DOMAIN/conf/vhost.conf
add vhost and restart apache
/usr/local/psa/admin/bin/websrvmng -av

enable php5 for domain

cd into the domains conf directory:

cd /var/www/vhosts/DOMAIN/

copy the php5 binary into the domains cgi-bin:

cp /usr/local/php5/bin/php-cgi cgi-bin/php5

chown the php5 binary

chown username:psacln cgi-bin/php5

add the following lines to vhost.conf:

<Directory /var/www/vhosts/myperl.co.uk/httpdocs> AddType application/x-httpd-php5 .php Action application/x-httpd-php5 /cgi-bin/php5 </Directory>

save it then restart apache

/usr/local/psa/admin/bin/websrvmng -av

parse .htm files for php

add the following to the sites vhost.conf file

AddHandler application/x-httpd-php .htm

enabling perl / cgi

open the sites vhost.conf and add the following lines:

<Directory /var/www/vhosts/DOMAIN/httpdocs> Options ExecCGI AddHandler cgi-script .cgi .pl </Directory>