File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1615,6 +1615,26 @@ if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
16151615 ip=$pub_ip
16161616fi
16171617
1618+ # Configuring libapache2-mod-remoteip
1619+ if [ " $apache " = ' yes' ] && [ " $nginx " = ' yes' ] ; then
1620+ cd /etc/apache2/mods-available
1621+ echo " <IfModule mod_remoteip.c>" > remoteip.conf
1622+ echo " RemoteIPHeader X-Real-IP" >> remoteip.conf
1623+ if [ " $local_ip " != " 127.0.0.1" ] && [ " $pub_ip " != " 127.0.0.1" ]; then
1624+ echo " RemoteIPInternalProxy 127.0.0.1" >> remoteip.conf
1625+ fi
1626+ if [ ! -z " $local_ip " ] && [ " $local_ip " != " $pub_ip " ]; then
1627+ echo " RemoteIPInternalProxy $local_ip " >> remoteip.conf
1628+ fi
1629+ if [ ! -z " $pub_ip " ]; then
1630+ echo " RemoteIPInternalProxy $pub_ip " >> remoteip.conf
1631+ fi
1632+ echo " </IfModule>" >> remoteip.conf
1633+ sed -i " s/LogFormat \" %h/LogFormat \" %a/g" /etc/apache2/apache2.conf
1634+ a2enmod remoteip >> $LOG
1635+ systemctl restart apache2
1636+ fi
1637+
16181638# Configuring MariaDB host
16191639if [ " $mysql " = ' yes' ]; then
16201640 $HESTIA /bin/v-add-database-host mysql localhost root $mpass
You can’t perform that action at this time.
0 commit comments