# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 05-27-2026
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
#  Require local
   AuthName "Nagios Core"
   AuthType Basic
   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
   Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
#  Require local
   AuthName "Nagios Core"
   AuthType Basic
   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
   Require valid-user
</Directory>

# Do not allow access to php files in pnp templates from the web
<Directory "/usr/local/nagios/share/pnp/templates">
   Require all denied
</Directory>

