File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1177,6 +1177,11 @@ $VESTA/bin/v-update-sys-ip
11771177ip=$( ip addr| grep ' inet ' | grep global| head -n1| awk ' {print $2}' | cut -f1 -d/)
11781178copy_of_ip=$ip
11791179
1180+ # Firewall configuration
1181+ if [ " $iptables " = ' yes' ]; then
1182+ $VESTA /bin/v-update-firewall
1183+ fi
1184+
11801185# Get public ip
11811186pub_ip=$( curl -s vestacp.com/what-is-my-ip/)
11821187
@@ -1185,15 +1190,9 @@ if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
11851190 ip=$pub_ip
11861191fi
11871192
1188- # Firewall configuration
1189- if [ " $iptables " = ' yes' ]; then
1190- $VESTA /bin/v-update-firewall
1191- fi
1192-
11931193# Configuring libapache2-mod-remoteip
11941194if [ " $apache " = ' yes' ] && [ " $nginx " = ' yes' ] ; then
1195- # Get public ip after firewall update
1196- copy_of_pub_ip=$( curl -s vestacp.com/what-is-my-ip/)
1195+ copy_of_pub_ip=$pub_ip
11971196 echo " <IfModule mod_remoteip.c>" > /etc/apache2/mods-available/remoteip.conf
11981197 echo " RemoteIPHeader X-Real-IP" >> /etc/apache2/mods-available/remoteip.conf
11991198 if [ " $copy_of_ip " != " 127.0.0.1" ] && [ " $copy_of_pub_ip " != " 127.0.0.1" ]; then
You can’t perform that action at this time.
0 commit comments