My environment:
- GNU/Debian 10
- Apache 2.4 with mod-status
- Virtual Host name based.
I have this restriction on status.conf.
<IfModule mod_status.c>
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Uncomment and change the "192.0.2.0/24" to allow access from other hosts.
<Location /server-status>
SetHandler server-status
Require ip <private-ip>/26
Require ip <public-ip>/24
Require ip some.ip...
</Location>
# Keep track of extended status information for each request
ExtendedStatus On
# Determine if mod_status displays the first 63 characters of a request or
# the last 63, assuming the request itself is greater than 63 chars.
# Default: Off
#SeeRequestTail On
<IfModule mod_proxy.c>
# Show Proxy LoadBalancer status in mod_status
ProxyStatus On
</IfModule>
</IfModule>
Suppose I have a Virtual Host named www.example.org.
This configuration seams to have no effect when I reach https://www.example.org/server-status with a client. All my requests works, with or without my VPN. Even if my requests are outside "required ip".
But if I move those configuration inside my VirtualHost www.example.org, it works! If my requests comes from a required IP it's OK, but if they come from outside the required range it fails.
Why global Apache configurations are ignored by Virtual Host?
Thanks.
question from:
https://stackoverflow.com/questions/65924223/apache-server-status-configuration-is-ignored-by-virtual-host-apache-2-4 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…