Posted By

zachharkey on 11/16/09


Tagged

textmate Plesk


Versions (?)

Plesk Event Handler for New Subdomain


 / Published in: Other
 

  1. #!/bin/bash
  2.  
  3. SUB="/home/httpd/vhosts/$1/subdomains/$2"
  4.  
  5. if [ ! -d $SUB/conf ]; then
  6. mkdir $SUB/conf
  7. fi
  8. echo "ServerAlias $2" >> $SUB/conf/vhost.conf
  9. cat << __EOT > $SUB/conf/vhost.conf
  10.  
  11. ServerAlias $2
  12. <Directory $SUB/httpdocs>
  13. php_admin_value open_basedir none
  14. </Directory>
  15.  
  16. __EOT
  17.  
  18. /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=$2.$1
  19. service httpd restart

Report this snippet  

You need to login to post a comment.