Commit 321f1dff authored by Vitaly Lipatov's avatar Vitaly Lipatov

add update apache script

parent da320eab
#!/bin/sh
if [ -s "/etc/httpd2/conf/mods-enabled/rpaf.conf" ] && [ ! -s "/etc/httpd2/conf/mods-enabled/remoteip.conf" ] ; then
IPS=$(grep RPAFproxy_ips /etc/httpd2/conf/mods-enabled/rpaf.conf | sed "s|RPAFproxy_ips ||g")
cat <<EOF >/etc/httpd2/conf/mods-enabled/remoteip.conf
<IfModule remoteip_module>
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy $IPS
</IfModule>
EOF
fi
a2dismod rpaf
a2enmod remoteip
subst 's|LogFormat "%h|LogFormat "%a|g' /etc/httpd2/conf/mods-available/log_config.conf
subst "s|;date.timezone =|date.timezone = 'Europe/Moscow'|g" /etc/php/*/apache2-mod_php/php.ini
rm -fv /etc/localtime
serv clock tzset
serv httpd2 restart
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment