/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/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