ServerName nagios.<%= @default_host_domain %>
Redirect permanent / https://nagios.<%= @default_host_domain %>/
ServerName nagios.<%= @default_host_domain %>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/nagios.<%= @default_host_domain %>/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/nagios.<%= @default_host_domain %>/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nagios.<%= @default_host_domain %>/privkey.pem
Header add Strict-Transport-Security "max-age=15768000"
Header add X-Frame-Options DENY
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
# Where the stylesheets (config files) reside
Alias /nagios3/stylesheets /etc/nagios3/stylesheets
# Where the HTML pages live
Alias /nagios3 /usr/share/nagios3/htdocs
RedirectMatch ^/?$ https://nagios.<%= @default_host_domain %>/cgi-bin/nagios3/status.cgi?host=all
AuthType Digest
AuthName "monitoring"
AuthDigestProvider file
AuthUserFile /etc/apache2/users/monitoring
Require valid-user
Options FollowSymLinks
DirectoryIndex index.php index.html
Order Allow,Deny
Allow From All
Options +ExecCGI
# 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