Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to deactivate the /server-status from an Apache2 running on a Fedora server.

I tried to comment the lines in /etc/httpd/conf/httpd.conf and I also tried to make it work only for my IP, like that:

<Location /server-status>
   SetHandler server-status
   Order deny,allow
   Deny from all
   Allow from 192.168.100.138
   #Allow from 194.106.52.52
   #Allow from localhost
</Location>

There is also a Tomcat behind the Apache, and I found that configuration on it, played with that also but got no luck...

/etc/httpd/vhosts.d/enabled/mysite.conf

#JkUnMount /server-status tomcat6

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

I tried to comment and uncomment the JkUnMount line and also the whole location block code.

What am I doing wrong? Is there any other configuration file that I didn't notice?

Thanks in advance!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

1. Find all matches of /server-status in web server Apache log files using command:

% find /etc/httpd -type f -iname '*.conf' |xargs grep -n "/server-status"

2. Comment all matched blocks using # 3. Check web server Apache config:

% /sbin/service httpd configtest

3. Restart web server Apache using command:

% /sbin/service httpd graceful
share|improve this answer
    
Thanks for the hint There is no need for a restart, a reload is more efficient –  enTropy Mar 5 '13 at 16:36

Fedora does not include any Location blocks for server status, so any that exist were put there by you or another application you installed.

Remove all of the Location blocks that you set up for this, and then reload Apache.

systemctl reload httpd.service

Most likely you either forgot to remove one of the Location blocks, or you forgot to reload Apache.

share|improve this answer
    
I could not find systemctl so I executed the init script manually. Nevertheless it worked when I commented both blocks completely, it is weird because I wouldn't mind to have server-status allowed for certain ip's... –  enTropy Mar 5 '13 at 16:37
    
It would help if I hadn't mistyped it. Oops! –  Michael Hampton Mar 5 '13 at 16:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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