logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Help with Location /server-status
Author
Jasmin1024



Joined: 24 Sep 2019
Posts: 3
Location: Germany, Bamberg

PostPosted: Tue 24 Sep '19 16:32    Post subject: Help with Location /server-status Reply with quote

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

PostPosted: Tue 24 Sep '19 17:09    Post subject: Re: Help with <Location /server-status> Reply with quote

<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

PostPosted: Tue 24 Sep '19 17:12    Post subject: Reply with quote

Require ip 127.0.0.1
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3049
Location: Hilversum, NL, EU

PostPosted: Tue 24 Sep '19 19:57    Post subject: Reply with quote

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

PostPosted: Tue 24 Sep '19 21:35    Post subject: Reply with quote

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

PostPosted: Tue 24 Sep '19 23:04    Post subject: Reply with quote

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

PostPosted: Wed 25 Sep '19 9:19    Post subject: Reply with quote

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

PostPosted: Fri 27 Sep '19 3:53    Post subject: Reply with quote

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


Reply to topic   Topic: Help with Location /server-status View previous topic :: View next topic
Post new topic   Forum Index -> Apache