File tree Expand file tree Collapse file tree 4 files changed +12
-15
lines changed
Expand file tree Collapse file tree 4 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,8 @@ All notable changes to this project will be documented in this file.
88- Added the ability to set the php cli version per user (using alias).
99- Added support for resolving ip addresses based on geoip database for Awstats
1010
11-
1211### Bugfixes
13- - Disable Apache2 Server Status Module by default .
12+ - Do not allow to show apache2 server-status page from public .
1413- Do not allow to change the password of a non-hestia user. Thanks to Alexandre Zanni!
1514- Use sury repository for Apache2 packages.
1615- Check whether Nginx, Apache2 and MariaDB are selected for installation prior to adding third party repositories.
Original file line number Diff line number Diff line change @@ -1188,7 +1188,6 @@ if [ "$apache" = 'yes' ]; then
11881188 a2enmod suexec > /dev/null 2>&1
11891189 a2enmod ssl > /dev/null 2>&1
11901190 a2enmod actions > /dev/null 2>&1
1191- a2dismod status > /dev/null 2>&1
11921191 if [ " $release " -eq 10 ]; then
11931192 a2enmod mpm_itk > /dev/null 2>&1
11941193 else
@@ -1206,6 +1205,9 @@ if [ "$apache" = 'yes' ]; then
12061205 chmod 640 /var/log/apache2/access.log /var/log/apache2/error.log
12071206 chmod 751 /var/log/apache2/domains
12081207
1208+ # Prevent remote access to server-status page
1209+ sed -i ' /Allow from all/d' /etc/apache2/mods-enabled/status.conf
1210+
12091211 update-rc.d apache2 defaults > /dev/null 2>&1
12101212 systemctl start apache2 >> $LOG
12111213 check_result $? " apache2 start failed"
Original file line number Diff line number Diff line change @@ -1165,7 +1165,6 @@ if [ "$apache" = 'yes' ]; then
11651165 a2enmod ssl > /dev/null 2>&1
11661166 a2enmod actions > /dev/null 2>&1
11671167 a2enmod ruid2 > /dev/null 2>&1
1168- a2dismod status > /dev/null 2>&1
11691168 mkdir -p /etc/apache2/conf.d
11701169 mkdir -p /etc/apache2/conf.d/domains
11711170 echo " # Powered by hestia" > /etc/apache2/sites-available/default
@@ -1178,15 +1177,12 @@ if [ "$apache" = 'yes' ]; then
11781177 chmod 640 /var/log/apache2/access.log /var/log/apache2/error.log
11791178 chmod 751 /var/log/apache2/domains
11801179
1181- if [ " $release " != ' 20.04' ]; then
1182- update-rc.d apache2 defaults > /dev/null 2>&1
1183- systemctl start apache2 >> $LOG
1184- check_result $? " apache2 start failed"
1185- fi
1186- else
1187- update-rc.d apache2 disable > /dev/null 2>&1
1188- systemctl stop apache2 > /dev/null 2>&1
1189- fi
1180+ # Prevent remote access to server-status page
1181+ sed -i ' /Allow from all/d' /etc/apache2/mods-enabled/status.conf
1182+
1183+ update-rc.d apache2 defaults > /dev/null 2>&1
1184+ systemctl start apache2 >> $LOG
1185+ check_result $? " apache2 start failed"
11901186
11911187
11921188# ----------------------------------------------------------#
Original file line number Diff line number Diff line change 77# ######################################################################################
88
99if [ -e " /etc/apache2/mods-enabled/status.conf" ]; then
10- echo " (*) Disable Apache2 Server Status Module..."
11- a2dismod status > /dev/null 2>&1
10+ echo " (*) Hardening Apache2 Server Status Module..."
11+ sed -i ' /Allow from all/d ' /etc/apache2/mods-enabled/status.conf
1212fi
1313
1414# Add sury apache2 repository
You can’t perform that action at this time.
0 commit comments