Skip to content

Commit 579b1ac

Browse files
authored
Subroutine for mod_remoteip in /bin/v-add-sys-ip
1 parent 654838b commit 579b1ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/v-add-sys-ip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ if [ ! -z "$PROXY_SYSTEM" ]; then
142142
rpaf_str="$rpaf_str $ip"
143143
sed -i "s/.*RPAFproxy_ips.*/$rpaf_str/" $rpaf_conf
144144
fi
145+
146+
#mod_remoteip
147+
remoteip_conf="/etc/$WEB_SYSTEM/mods-enabled/remoteip.conf"
148+
if [ $( grep -ic "$ip" $remoteip_conf ) -eq 0 ]; then
149+
sed -i "s/<\/IfModule>/RemoteIPInternalProxy $ip\n<\/IfModule>/g" $remoteip_conf
150+
fi
145151
fi
146152

147153

0 commit comments

Comments
 (0)