I have configured mod_status like this in my Apache 2 config file:

<Location /server-status>
    SetHandler server-status

    Order Deny,Allow
</Location>

I also tried:

Order Deny,Allow
allow from all

And:

Order Allow,Deny
allow from all

And:

Order Deny,Allow
Deny from all
Allow from 145.xxx.xx.xx

And of course I restarted Apache after each configuration change. I tried the configurations above in my main config file and under a VirtualHost directive.

When I place the configuration under VirtualHost or in a NameVirtualHost block I get a 404 instead of 403.

But I get only get 403 Forbidden when I visit example.com/server-status/

I don't use an .htaccess file.

It works now! I placed the server-status code right above the definitions of the virtual hosts. I didn't test the right configuration on the right virtual host. On the virtual host without htaccess files it works, on virtual hosts with an app installed I get 404 because of url rewrites in the htaccess file.

link|improve this question
feedback

1 Answer

Check in your config if you've got any Include directives lower than your Location directive that could be causing this problem. It could be due to a clashing set of directives in an Included configuration file you might not realize you are including.

Also, make sure you are loading the mod_status module! :)

link|improve this answer
I've got only one configuration file and one file with virtual hosts. My config is very simple. mod_status is enabled. – i.amniels Apr 29 '11 at 21:14
It fails going to example.com/server-status/ ? You don't need the backslash at the end. – mahnsc Apr 30 '11 at 7:49
With or without slash, the result is the same. Thanks for your help. – i.amniels May 1 '11 at 17:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.