Ad Widget

Collapse

Apache monitoring: how to use Basic Auth?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mangrove
    Junior Member
    • Jul 2025
    • 1

    #1

    Apache monitoring: how to use Basic Auth?

    Noob here. Using the Apache guide for a host, there is no option to set options, such as Basic Auth. I have no reason to leave the status page needed for monitoring readable for the world, so I want to use some security. Now it's possible to drill down to "discovery rules", and the Basic Auth is accessible in "Apache by HTTP" and then "Get status", if you clone the "Get Status" bit (phew). However, I can't figure out how to replace the current discovery rule/"Get status" bit with my cloned version. Is it at all possible? Or am I doing it the wrong way?
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Not an answer to your question (sorry), but since your Zabbix server and/or proxy/proxies will have fixed IPs, you may find it easier to use a Require block for that Location that allows access from the IP(s) that have a reasonable basis for querying mod_status.

    The syntax assumes httpd 2.4.x access control:

    Code:
      <Location "/server-status">
        <RequireAny>
          Require local
          Require ip  your_ips_or_subnet/CIDR_here
        </RequireAny>
        SetHandler server-status
      </Location>

    Comment

    Working...