From 05e39a5d32842d02f0381690c7cace28c50df225 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sat, 29 Apr 2017 21:22:24 +0000 Subject: [PATCH 1/2] Attempt running nagios on web root Signed-off-by: Patrick Uiterwijk --- roles/nagios_server/files/httpd/nagios.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nagios_server/files/httpd/nagios.conf b/roles/nagios_server/files/httpd/nagios.conf index e68175c4a3..9dc07108f6 100644 --- a/roles/nagios_server/files/httpd/nagios.conf +++ b/roles/nagios_server/files/httpd/nagios.conf @@ -27,7 +27,7 @@ ScriptAlias /tac.cgi /usr/lib64/nagios/cgi-bin/tac.cgi Options None -Alias /nagios /usr/share/nagios/html/ +Alias / /usr/share/nagios/html/ # This will only affect noc2 because the proxies only forward -external to it. Alias /nagios-external /usr/share/nagios/html/ From 918d1ea42c2a4b1aaf0bbcd9d45dad7b244d520b Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sat, 29 Apr 2017 21:26:18 +0000 Subject: [PATCH 2/2] Turns out Stephen was smarted than me, and realized how silly this was before I did Signed-off-by: Patrick Uiterwijk --- roles/nagios_server/files/httpd/nagios.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/nagios_server/files/httpd/nagios.conf b/roles/nagios_server/files/httpd/nagios.conf index 9dc07108f6..ac2b5984a8 100644 --- a/roles/nagios_server/files/httpd/nagios.conf +++ b/roles/nagios_server/files/httpd/nagios.conf @@ -27,7 +27,10 @@ ScriptAlias /tac.cgi /usr/lib64/nagios/cgi-bin/tac.cgi Options None -Alias / /usr/share/nagios/html/ +RewriteEngine on +RewriteRule ^/$ /nagios/ [R] + +Alias /nagios /usr/share/nagios/html/ # This will only affect noc2 because the proxies only forward -external to it. Alias /nagios-external /usr/share/nagios/html/