Question

I have been searching everywhere looking for how to properly enable mod_status and nothing has worked. My server is called "willserver.main.ca". I am running the server on a windows virtual machine. I tried adding this to HTTPD config file:

<location /server-status>
SetHandler server-status

Order Deny,Allow
Deny from all
Allow from main.ca

</location>

Any tips or help? I don't know if I am supposed to uncomment something or if I am just trying the wrong syntax over and over

Was it helpful?

Solution

Ok, first confirm that you have a LoadModule that looks similar to this:

LoadModule status_module modules/mod_status.so

If that isn't there, then you'll need to download and add it.

If it is there then try this:

<Location /server-status> 
    SetHandler server-status 
    Order allow,deny
    Allow from all
</Location>

See if you can then hit http://www.my-domain.com/server-status

If you can then switch it to:

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

Where 192.168.1.100 is your internal IP if accessing internally or your external IP. This will restrict it so not just anyone can access it. You can then add multiple Allow from for each IP / IP range that requires access.

OTHER TIPS

Apache 2.4 do not appear to like a space in the Order directive.

Order Allow, Deny only works as

Order Allow,Deny

mod_status built into Apache web server to get server status from a web browser. With this module we can easily find out how well the server is performing. All reports are generated in a html format.

Step1. Check if status module is enabled or not apache2ctl -M or ls /etc/apache2/sites-enabled

Step2. If not enabled, enable it by the command,

sudo a2enmod status

step3. Configure access,

Open /etc/apache2/mods-enabled/status.conf and comment the lines,

        #<Location /server-status>
        #    SetHandler server-status
        #    Require local
        #Require ip 192.0.2.0/24
        #</Location>

And add the following line,

        <Location /server-status>
        SetHandler server-status
        Order deny,allow
        Allow from all
        </Location>

We can restrict the access of server status for particular IP’s in this configuration by editing , Allow from our_public_ipaddress instead of Allow from all

Save the status.conf file .

Step4. Restart apache by the command,

/etc/init.d/apache2 restart

Step5. Check the server status page in browser

http://server-ip/server-status

Hope this would be helpful.

In Mac OS X Yosemite I had to use this otherwise some endless loop was happening:

<IfModule mod_status.c>
   # Allow server status reports generated by mod_status,
   # with the URL of http://servername/server-status
   # Change the ".example.com" to match your domain to enable.
   #
   <Location /server-status>
     SetHandler server-status
     Order deny,allow
     Allow from all
   </Location>
</IfModule>

Taken from https://osiutino.wordpress.com/2014/06/12/install-apache-2-4-9-on-mac-osx-10-9-mavericks/

I developed a javascript application to display data in graphs https://github.com/dioubernardo/apacheServerStatusCharts

Below config worked for me.

ExtendedStatus on
<Location /mod_status>
  SetHandler server-status
  Require local
</Location>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top