Ad Widget

Collapse

Failed to fetch apache2 server status page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tcpdumpling
    Junior Member
    • Feb 2019
    • 2

    #1

    Failed to fetch apache2 server status page

    Hello everyone,

    I'm trying to monitor Apache with this template https://github.com/v-zhuravlev/zbx_template_apache2

    It's working fine on the host that runs the zabbix-server app on the LAN. I'm trying to monitor a dev server that's hosted on GCP. When I access the /server-status page of that server from my browser it works fine but here's the response Zabbix gets :

    HTTP/1.1 302 Found Date: Thu, 28 Feb 2019 22:44:58 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.15 Location: https://[domain name]/server-status?auto Content-Length: 224 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="https://[domain name]/server-status?auto">here</a>.</p> </body></html> The Zabbix template is set to follow redirects.

    On that server the Apache logs are this :

    [zabbix server IP] - - [28/Feb/2019:22:56:46 +0000] "GET /server-status?auto HTTP/1.1" 302 224

    ::1 - - [28/Feb/2019:22:56:58 +0000] "GET /server-status?auto HTTP/1.1" 302 224

    Anyone has an idea as what could be causing this?
    Last edited by tcpdumpling; 04-03-2019, 18:20. Reason: apache
  • tcpdumpling
    Junior Member
    • Feb 2019
    • 2

    #2
    Hi,

    After wrapping the server-status handler in a vhost it fixed it.

    <VirtualHost *:80>

    DocumentRoot "/var/www/html"

    <Location /server-status>

    SetHandler server-status

    Require ip ::1

    Require ip 127.0.0.1

    Require ip xxx.xxx.xxx.xxx

    </Location>

    </VirtualHost>

    Comment

    • ñull
      Junior Member
      • Dec 2020
      • 3

      #3
      The configuration of this mod should already exist in (Ubuntu) /etc/apache2/mods-available/ . All I needed was adding Require ip entries for the IPv4 and IPv6 addresses of the Zabbix server. When you use proxy I guess you'll have to add its IPs instead.

      Comment

      Working...