Return to Snippet

Revision: 20480
at November 16, 2009 23:06 by zachharkey


Initial Code
#!/bin/bash

SUB="/home/httpd/vhosts/$1/subdomains/$2"

if [ ! -d $SUB/conf ]; then
  mkdir $SUB/conf
fi 
echo "ServerAlias $2" >> $SUB/conf/vhost.conf
cat << __EOT > $SUB/conf/vhost.conf

ServerAlias $2
<Directory $SUB/httpdocs>
 php_admin_value open_basedir none
</Directory>

__EOT

/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=$2.$1
service httpd restart                      

Initial URL

                                

Initial Description

                                

Initial Title
Plesk Event Handler for New Subdomain

Initial Tags
textmate

Initial Language
Other