Author |
|
Jasmin1024
Joined: 24 Sep 2019 Posts: 3 Location: Germany, Bamberg
|
Posted: Tue 24 Sep '19 16:32 Post subject: Help with Location /server-status |
|
|
i am newbie
I got Apache 2.4 with php 7 with OS Win 7
need to enable the server-status url in
apache config files
have this in the httpd-conf.info with
my internal ip of my monitoring pc
Code: | <Location /server-status>
SetHandler server-status
order deny, allow
allow from 127.0.0.1
allow from 192.168.123.4 # IP monitoring PC
deny from all
</Location> |
have activated this module with this lines
in httpd.conf:
Code: | LoadModule session_module modules/mod_session.so
ExtendedStatus On |
got this error from my app, i wanted to install:
"failed to fetch http://localhost/server-status - The requested URL returned error: 404 Not Found - Maybe you need to check your server config."
found no folder "server-status" in my appache installation
think its a rookie error - sure you can help |
|
Back to top |
|
spser
Joined: 29 Aug 2016 Posts: 97
|
Posted: Tue 24 Sep '19 17:09 Post subject: Re: Help with <Location /server-status> |
|
|
<IfModule status_module>
Alias /server-status "${QAMPPAPIPATH}"
<Location /server-status>
SetHandler server-status
</Location>
#ExtendedStatus On
</IfModule> |
|
Back to top |
|
spser
Joined: 29 Aug 2016 Posts: 97
|
Posted: Tue 24 Sep '19 17:12 Post subject: |
|
|
Require ip 127.0.0.1 |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Tue 24 Sep '19 19:57 Post subject: |
|
|
You wrote: LoadModule session_module modules/mod_session.so
must be: LoadModule status_module modules/mod_status.so
You say you run Apache 2.4, so:
<Location /server-status>
SetHandler server-status
Require ip 192.168.123.4
Require ip 127.0.0.1
</Location>
ExtendedStatus On |
|
Back to top |
|
Jasmin1024
Joined: 24 Sep 2019 Posts: 3 Location: Germany, Bamberg
|
Posted: Tue 24 Sep '19 21:35 Post subject: |
|
|
yes - it was the wrong module
i fixed this in httpd.conf
i tried both code-snippets for the httpd-info.conf
but the error still remains
there is no status-server folder
in my apache folder (2.4.39)
is this the problem? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 24 Sep '19 23:04 Post subject: |
|
|
No, there is no folder. It's a "Handler" in mod_status.
Make sure mod_status is loaded.
Make sure the "Include" httpd-info.conf line is uncommented down near the bottom of httpd.conf
Steffen's config for it above should do just fine. |
|
Back to top |
|
Jasmin1024
Joined: 24 Sep 2019 Posts: 3 Location: Germany, Bamberg
|
Posted: Wed 25 Sep '19 9:19 Post subject: |
|
|
thx - yes the include httpd-info.conf line was commented in the httpd.conf - ups - i fixed it!
mod_status is loaded - yes
I tried Steffen's config but the error remains
my original untouched httpd-info.conf
after installation looks so:
Code: | <Location /server-status>
SetHandler server-status
Require host .example.com
Require ip 127
</Location> |
assumed that server have: 192.168.2.66
and client have 192.168.2.67
it is this the right code ? >
Code: | <Location /server-status>
SetHandler server-status
Require host 192.168.2.66
Require ip 192.168.2.67
</Location> |
|
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 27 Sep '19 3:53 Post subject: |
|
|
Jasmin1024 wrote: |
assumed that server have: 192.168.2.66
and client have 192.168.2.67
it is this the right code ? >
Code: | <Location /server-status>
SetHandler server-status
Require host 192.168.2.66
Require ip 192.168.2.67
</Location> |
|
No.
Require host is for hostnames like yourhostname.com
Require ip is for IP addresses like 10.1.10.1.
As for sitting at the server's desktop to look at it using the URL http://localhost/server-status. For that Require local is all you need.
Kinda like Code: | <Location /server-status>
SetHandler server-status
Require local
<Location> |
On the client side computer you will have to use the URL of http://192.168.2.66/server-status to see it.
Require ip 192.168.2.67 for that
Kinda like Code: | <Location /server-status>
SetHandler server-status
Require local
Require ip 192.168.2.67
<Location> |
|
|
Back to top |
|