I use Apache's mod_info to display detailed information about my server setup.


# Set path below to be handled by mod_info. It will show server info. 
# For this to work, this module must be loaded (uncommented in httpd.conf)
<Location /special/path>
   SetHandler server-info
   Order allow,deny
   Allow from

Allow from is set to the local machine because this is on my dev machine.

This module allows me to see a tremendous amount of information by navigating to /special/path. I'd like to use it on my public server but need to secure it somehow so others cannot load that path.

The docs discuss whitelisting by IP address but I have an organizational IP, shared by many.

What's the most practical way to protect this path? Apache 2.4.16


You're not limited to setting IP access controls, you can also use any other access control that is allowed in a <Location> scope, or combination thereof. So use the RequireAll directive to require both a specific IP-address and set up authentication and require a specific login.

<Location /special/path>
  SetHandler server-info
  AuthType Basic
  AuthName "Restricted Access To Special Location"
  AuthBasicProvider file
  AuthUserFile "/usr/local/apache/passwd/passwords"
    Require ip
    Require user BeetleJuice   
  • If you can, please elaborate just a bit. (1) how will server know that BeetleJuice is connecting and how will it check/verify password? (2) Where does this directive go relative to <Location>? Is it a child node (ie. within the location tags). Sep 14 '16 at 4:58
  • Thank you. Will study that document later in the day and try to apply it. Sep 14 '16 at 5:02

Set it to only be available on, and then access it via an ssh tunnel.

  • I can access webpage via SSH tunnel? Would you show one example please? And does that mean SSH connection doesn't see my remote IP? I ask because in the logs I can see the IP I"m connecting to SSH from Sep 14 '16 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.