security - Apache: how to protect mod_info output -


i use apache's mod_info display detailed information server setup.

httpd-vhosts.conf

# set path below handled mod_info. show server info.  # work, module must loaded (uncommented in httpd.conf) <location /special/path>    sethandler server-info    order allow,deny    allow 127.0.0.1 </location> 

allow from set local machine because on dev machine.

this module allows me see tremendous amount of information navigating /special/path. i'd same benefit on production server, can see output remotely. means need make path publicly accessible of course keep info away prying eyes.

what's practical way protect output? i'm ok static password challenge long password not stored in clear (hashed ok) , not stored in publicly accessible location.

apache 2.4.16

to solve problem, used configuration:

# paths beginning /admin password protected # credentials /path/admin.htpasswd <location /admin>   authtype basic   authname "administrators"   authbasicprovider file   authuserfile "/path/admin.htpasswd"   require valid-user </location>  <ifmodule info_module>     <location /admin/server-info>         sethandler server-info     </location> </ifmodule> 

the .htpasswd file contains 1 {username}:{hashed password} per line. eg:

linda:$apr1$hq20v6ox$ukfyont91i1bhcae0yj7b1 eric:$apr1$h4xruuns$hi61jts1nqogi/ehmnc0x0 

i used password hash generator htaccesstools.com


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -