Bug 14347 - Security: Extra files on Secondary Storage VM's Apache root

status 14347: resolved fixed
This commit is contained in:
frank 2012-03-16 17:04:26 -07:00
parent eab2a0c5b8
commit c1620cbfd0

View File

@ -405,6 +405,10 @@ setup_apache2() {
[ -f /etc/apache2/ports.conf ] && sed -i -e "s/NameVirtualHost .*:80/NameVirtualHost $ip:80/g" /etc/apache2/ports.conf
[ -f /etc/apache2/conf.d/security ] && sed -i -e "s/^ServerTokens .*/ServerTokens Prod/g" /etc/apache2/conf.d/security
[ -f /etc/apache2/conf.d/security ] && sed -i -e "s/^ServerSignature .*/ServerSignature Off/g" /etc/apache2/conf.d/security
# Disable listing of http://SSVM-IP/icons folder for security issue. see article http://www.i-lateral.com/tutorials/disabling-the-icons-folder-on-an-ubuntu-web-server/
[ -f /etc/apache2/mods-available/alias.conf ] && sed -i s/"Options Indexes MultiViews"/"Options -Indexes MultiViews"/ /etc/apache2/mods-available/alias.conf
echo "Options -Indexes" > /var/www/html/.htaccess
}
@ -631,7 +635,7 @@ setup_secstorage() {
setup_sshd $ETH0_IP
fi
setup_apache2 $ETH2_IP
disable_rpfilter
enable_fwding 0
enable_svc haproxy 0