# ************************************
# Vhost template in module nagios
# Managed by Puppet
# ************************************

<VirtualHost <%= @wsgi_vhost_listen_ip %>:<%= @http_port %>>
  ServerName nagios
  DocumentRoot "/usr/share/nagios3/htdocs"

  # WSGI implementation for the process_service_check command
  SetEnv NAGIOS_CMD_FILE <%= @nagios_command_file %>
  WSGIScriptAlias <%= @wsgi_process_service_checks_location %> <%= @wsgi_process_service_checks_script %>
  WSGIDaemonProcess nagios_process_service_checks user=nagios group=nagios processes=<%= @wsgi_processes %> threads=<%= @wsgi_threads %> display-name='%{GROUP}' maximum-requests=10000
  WSGIProcessGroup nagios_process_service_checks
  <Location <%= @wsgi_process_service_checks_location %>>
     AuthName "Nagios Access"
     AuthType Basic
     AuthUserFile <%= @cgi_htpasswd_file %>
     require valid-user
  </Location>

  ErrorLog "/var/log/apache2/nagios_wsgi_error.log"
  ServerSignature Off
  CustomLog "/var/log/apache2/nagios_wsgi_access.log" combined
</VirtualHost>

# ************************************
# Vhost template in module nagios
# Managed by Puppet
# ************************************

<VirtualHost <%= @wsgi_vhost_listen_ip %>:<%= @http_port %>>
  ServerName nagios

  # Disable directory indexes
  Options -Indexes
  <Directory />
    Options FollowSymLinks
    AllowOverride None
  </Directory>

  # WSGI implementation for the process_service_check command
  SetEnv NAGIOS_CMD_FILE <%= @nagios_command_file %>
  WSGIScriptAlias <%= @wsgi_process_service_checks_location %> <%= @wsgi_process_service_checks_script %>
  WSGIDaemonProcess nagios_process_service_checks user=nagios group=nagios processes=<%= @wsgi_processes %> threads=<%= @wsgi_threads %> display-name='%{GROUP}' maximum-requests=10000
  WSGIProcessGroup nagios_process_service_checks
  <Location <%= @wsgi_process_service_checks_location %>>
     AuthName "Nagios Access"
     AuthType Basic
     AuthUserFile <%= @cgi_htpasswd_file %>
     require valid-user
  </Location>

  ErrorLog "/var/log/apache2/nagios_wsgi_error.log"
  ServerSignature Off
  CustomLog "/var/log/apache2/nagios_wsgi_access.log" combined
</VirtualHost>

Disable Apache directory indexes for WSGI vhost
Disable Apache directory indexes for WSGI vhost

Change-Id: Id0402e56dd877da99b9d441b0ae9f979157c09e2
