Last active
August 12, 2017 01:58
-
-
Save vpetersson/6b1da35edbe3f7dc7ca4 to your computer and use it in GitHub Desktop.
Example on how to create a 'Secret URL' for Nagios in Apache.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example from http://www.screenlyapp.com/use-cases/dashboard/nagios.html | |
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3 | |
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3 | |
Alias /nagios3/stylesheets /etc/nagios3/stylesheets | |
Alias /nagios3 /usr/share/nagios3/htdocs | |
<Location /abc123> | |
# Hard code credentials | |
AuthBasicFake nagiosadmin nagiosadmin | |
ProxyHTMLLinks a href | |
ProxyHTMLLinks area href | |
ProxyHTMLLinks link href | |
ProxyHTMLLinks img src longdesc usemap | |
ProxyHTMLLinks object classid codebase data usemap | |
ProxyHTMLLinks q cite | |
ProxyHTMLLinks blockquote cite | |
ProxyHTMLLinks ins cite | |
ProxyHTMLLinks del cite | |
ProxyHTMLLinks form action | |
ProxyHTMLLinks input src usemap | |
ProxyHTMLLinks head profile | |
ProxyHTMLLinks base href | |
ProxyHTMLLinks script src for | |
ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \ | |
onmouseover onmousemove onmouseout onkeypress \ | |
onkeydown onkeyup onfocus onblur onload \ | |
onunload onsubmit onreset onselect onchange | |
ProxyPass http://localhost/nagios3 | |
ProxyPassReverse http://localhost/nagios3 | |
ProxyHTMLEnable On | |
ProxyHTMLExtended On | |
SetOutputFilter INFLATE;proxy-html;DEFLATE; | |
ProxyHTMLURLMap /nagios3 /abc123 | |
ProxyHTMLURLMap /cgi-bin/nagios3 /abc123/cgi-bin | |
</Location> | |
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)> | |
Options FollowSymLinks | |
DirectoryIndex index.php index.html | |
AllowOverride AuthConfig | |
Order Allow,Deny | |
Allow From All | |
AuthName "Nagios Access" | |
AuthType Basic | |
AuthUserFile /etc/nagios3/htpasswd.users | |
require valid-user | |
</DirectoryMatch> | |
<Directory /usr/share/nagios3/htdocs> | |
Options +ExecCGI | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment