File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Include vesta.conf
4+ source /usr/local/vesta/conf/vesta.conf
5+
6+ # Remove ol ip definitions from vesta.conf
7+ sed -i " /^Listen/d" /etc/$WEB_SYSTEM /conf.d/vesta.conf
8+ sed -i " /^NameVirtualHost/d" /etc/$WEB_SYSTEM /conf.d/vesta.conf
9+ sed -i " /^$/d" /etc/$WEB_SYSTEM /conf.d/vesta.conf
10+
11+ # Create new ip configs
12+ for ip in $( ls /usr/local/vesta/data/ips) ; do
13+ web_conf=" /etc/$WEB_SYSTEM /conf.d/$ip .conf"
14+
15+ if [ " $WEB_SYSTEM " = ' httpd' ] || [ " $WEB_SYSTEM " = ' apache2' ]; then
16+ echo " NameVirtualHost $ip :$WEB_PORT " > $web_conf
17+ echo " Listen $ip :$WEB_PORT " >> $web_conf
18+ fi
19+
20+ if [ " $WEB_SSL " = ' mod_ssl' ]; then
21+ echo " NameVirtualHost $ip :$WEB_SSL_PORT " >> $web_conf
22+ echo " Listen $ip :$WEB_SSL_PORT " >> $web_conf
23+ fi
24+ done
25+
26+ # Restart web server
27+ /usr/local/vesta/bin/v-restart-web
28+
29+ exit
You can’t perform that action at this time.
0 commit comments