How to enable server-status?

simpel

Verified User
Joined
Jun 6, 2019
Messages
11
I cant get it to work somehow.

i editted the /etc/httpd/conf/extra/httpd-info.conf file and set:

Code:
<Location /server-status>
    SetHandler server-status
    Require host www.ourserverhostname.tld
    Require ip 213.61.xx.xxx
</Location>
next i did a config check:

Code:
apachectl -t
Syntax OK
also made sure the needed modules are loaded:
Code:
httpd -M |grep authz
 authz_host_module (static)
 authz_groupfile_module (static)
 authz_user_module (static)
 authz_dbm_module (static)
 authz_owner_module (static)
 authz_dbd_module (static)
 authz_core_module (static)

httpd -M |grep info
 info_module (static)

httpd -M |grep status
 status_module (static)
restart apache and vistied the url:
Code:
www.ourserverhostname.tld/server-status
and get:

Forbidden
You don't have permission to access this resource.


error_log says:

[Mon Sep 02 12:16:37.666608 2019] [access_compat:error] [pid 29236:tid 140170980239104] [client 213.61.xx.xxx:43470] AH01797: client denied by server configuration: /var/www/html/server-status


so how to fix this?

I'm on centos 7 with the latest directadmin and everything updated
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,901
Location
GMT +7.00
Hello,

From here everything is looking fine. Will it work if you remove the both lines:

Code:
  Require host www.ourserverhostname.tld
  Require ip 213.61.xx.xxx
Do you have a reverse-proxy in front of Apache? Nginx probably?
 

simpel

Verified User
Joined
Jun 6, 2019
Messages
11
yes it works when removing the requires... but this server doesnt use nginx. Also no other reverse-proxy as far as i can tell.
 

simpel

Verified User
Joined
Jun 6, 2019
Messages
11
seems that without the requires and looking at the output of server-status, the server status page's client is not my ip address but that from the webserver itself?!

that sounds like a proxy but whenever i visit any other webpage it does show my ip as the client ip.
 

simpel

Verified User
Joined
Jun 6, 2019
Messages
11
never mind... seems my ip number had changed overnight.

it does work.
 
Top