2013-09-05 00:17:05 +02:00
|
|
|
<VirtualHost *:80>
|
2016-07-21 07:46:02 +02:00
|
|
|
ServerName nagios.<%= @hosts_domain %>
|
|
|
|
Redirect permanent / https://nagios.<%= @hosts_domain %>/
|
2012-12-01 03:03:41 +01:00
|
|
|
</VirtualHost>
|
2013-09-05 00:17:05 +02:00
|
|
|
|
|
|
|
<VirtualHost *:443>
|
2016-07-21 07:46:02 +02:00
|
|
|
ServerName nagios.<%= @hosts_domain %>
|
2012-10-26 20:01:55 +02:00
|
|
|
|
2012-12-01 03:03:41 +01:00
|
|
|
SSLEngine on
|
2016-07-21 07:46:02 +02:00
|
|
|
SSLCertificateFile /etc/letsencrypt/live/nagios.<%= @hosts_domain %>/cert.pem
|
|
|
|
SSLCertificateChainFile /etc/letsencrypt/live/nagios.<%= @hosts_domain %>/fullchain.pem
|
|
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/nagios.<%= @hosts_domain %>/privkey.pem
|
2012-10-26 20:01:55 +02:00
|
|
|
|
2012-12-01 03:03:41 +01:00
|
|
|
Header add Strict-Transport-Security "max-age=15768000"
|
2012-12-01 03:08:26 +01:00
|
|
|
Header add X-Frame-Options DENY
|
2012-10-26 20:01:55 +02:00
|
|
|
|
2012-12-01 03:03:41 +01:00
|
|
|
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
|
|
|
|
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
|
2012-10-26 20:01:55 +02:00
|
|
|
|
2012-12-01 03:03:41 +01:00
|
|
|
# Where the stylesheets (config files) reside
|
|
|
|
Alias /nagios3/stylesheets /etc/nagios3/stylesheets
|
2012-10-26 20:01:55 +02:00
|
|
|
|
2012-12-01 03:03:41 +01:00
|
|
|
# Where the HTML pages live
|
|
|
|
Alias /nagios3 /usr/share/nagios3/htdocs
|
2012-10-26 20:01:55 +02:00
|
|
|
|
2016-07-21 07:46:02 +02:00
|
|
|
RedirectMatch ^/?$ https://nagios.<%= @hosts_domain %>/cgi-bin/nagios3/status.cgi?host=all
|
2012-10-26 20:01:55 +02:00
|
|
|
|
2012-12-01 03:07:08 +01:00
|
|
|
<Location "/">
|
|
|
|
AuthType Digest
|
2020-05-29 00:00:30 +02:00
|
|
|
AuthName "monitoring"
|
2012-12-01 03:07:08 +01:00
|
|
|
AuthDigestProvider file
|
2020-05-29 00:00:30 +02:00
|
|
|
AuthUserFile /etc/apache2/users/monitoring
|
2012-12-01 03:07:08 +01:00
|
|
|
Require valid-user
|
|
|
|
</Location>
|
|
|
|
|
2012-12-01 03:03:41 +01:00
|
|
|
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)>
|
|
|
|
Options FollowSymLinks
|
2012-10-26 20:01:55 +02:00
|
|
|
|
2012-12-01 03:03:41 +01:00
|
|
|
DirectoryIndex index.php index.html
|
2012-10-26 20:01:55 +02:00
|
|
|
|
2012-12-01 03:03:41 +01:00
|
|
|
Order Allow,Deny
|
|
|
|
Allow From All
|
|
|
|
</DirectoryMatch>
|
|
|
|
|
|
|
|
<Directory /usr/share/nagios3/htdocs>
|
|
|
|
Options +ExecCGI
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
# Enable this ScriptAlias if you want to enable the grouplist patch.
|
|
|
|
# See http://apan.sourceforge.net/download.html for more info
|
|
|
|
# It allows you to see a clickable list of all hostgroups in the
|
|
|
|
# left pane of the Nagios web interface
|
|
|
|
ScriptAlias /nagios3/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi
|
|
|
|
</VirtualHost>
|