[Fixed] Apache mod_status: /server-status forbidden from 127.0.0.1

By | December 2, 2014

Advertisement from Google

If you have mod_status enabled but still got this error (403) when trying to connect from localhost (127.0.0.1) you can should do following:

First, go to /etc/apache2/mods-enabled/status.conf and check that you have all hosts that you want to connect from is added to Allow from, something like this:

 


Advertisement from Google

<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1 ::1
</Location>

Second, create VirtualHost configuration for 127.0.0.1 with following parameters:

<VirtualHost *:80>
        ServerAdmin superadmin@somemail.com
        ServerName 127.0.0.1
        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
<Directory /var/www>
        Options +FollowSymLinks
        AllowOverride None
        order allow,deny
        allow from all

</Directory>

</VirtualHost>

One thought on “[Fixed] Apache mod_status: /server-status forbidden from 127.0.0.1

Leave a Reply

Your email address will not be published. Required fields are marked *