# Autogenerated by Chef. <% unless node['nagios']['ldap_verify_cert'].nil? %>LDAPVerifyServerCert <%= node['nagios']['ldap_verify_cert'] %><% end %> <% unless node['nagios']['ldap_trusted_mode'].nil? -%>LDAPTrustedMode <%= node['nagios']['ldap_trusted_mode'] %> <% end -%> <% unless node['nagios']['ldap_trusted_global_cert'].nil? -%>LDAPTrustedGlobalCert <%= node['nagios']['ldap_trusted_global_cert'] %> <% end -%> > ServerAdmin <%= node['nagios']['sysadmin_email'] %> <% if @nagios_url %> ServerName <%= @nagios_url %> <% else %> ServerName <%= node['fqdn'] %> <% if node['nagios']['server']['server_alias'] %> ServerAlias <%= node['nagios']['server']['server_alias'] %> <% end %> <% end %> DocumentRoot <%= node['nagios']['docroot'] %> CustomLog <%= node['apache']['log_dir'] %>/nagios_access.log combined ErrorLog <%= node['apache']['log_dir'] %>/nagios_error.log <% if node['platform_family'] == 'debian' && node['nagios']['server']['install_method'] == 'package'-%> Alias /stylesheets /etc/<%= node['nagios']['server']['vname'] %>/stylesheets Alias /nagios3/stylesheets /etc/<%= node['nagios']['server']['vname'] %>/stylesheets <% end -%> ScriptAlias <%= node['nagios']['cgi-path'] %> <%= node['nagios']['cgi-bin'] %> ScriptAlias /cgi-bin/statusjson.cgi <%= node['nagios']['cgi-bin'] %>/statusjson.cgi Alias /<%= node['nagios']['server']['vname'] %> <%= node['nagios']['docroot'] %> "> Options ExecCGI <% if node['nagios']['default_user_name'] -%> require all granted <% end -%> <% if @https -%> SSLEngine On SSLProtocol all -SSLv3 -SSLv2 SSLCertificateFile <%= @ssl_cert_file %> <% if node['nagios']['ssl_cert_chain_file'] %> SSLCertificateChainFile <%= node['nagios']['ssl_cert_chain_file'] %> <% end -%> SSLCertificateKeyFile <%= @ssl_cert_key %> <% end -%> <% case node['nagios']['server_auth_method'] -%> <% when "openid" -%> AuthName "Nagios Server" AuthType OpenID require user <%= node['apache']['allowed_openids'].join(' ') %> AuthOpenIDDBLocation <%= node['apache']['mod_auth_openid']['dblocation'] %> <% when "cas" -%> CASLoginURL <%= node['nagios']['cas_login_url'] %> CASValidateURL <%= node['nagios']['cas_validate_url'] %> CASValidateServer <%= node['nagios']['cas_validate_server'] %> <% if node['nagios']['cas_root_proxy_url'] -%> CASRootProxiedAs <%= node['nagios']['cas_root_proxy_url'] %> <% end -%> AuthType CAS require <%= node['nagios']['server_auth_require'] %> <% when "ldap" -%> AuthName "Nagios Server" AuthType Basic AuthBasicProvider ldap <% unless node['nagios']['ldap_group_attribute_is_dn'].nil? %>AuthLDAPGroupAttributeIsDN <%= node['nagios']['ldap_group_attribute_is_dn'] %><% end %> <% unless node['nagios']['ldap_group_attribute'].nil? -%>AuthLDAPGroupAttribute "<%= node['nagios']['ldap_group_attribute'] %>" <% end -%> <% unless node['nagios']['ldap_bind_dn'].nil? -%>AuthLDAPBindDN "<%= node['nagios']['ldap_bind_dn'] %>" <% end -%> <% unless node['nagios']['ldap_bind_password'].nil? -%>AuthLDAPBindPassword "<%= node['nagios']['ldap_bind_password'] %>"<% end -%> AuthLDAPURL "<%= node['nagios']['ldap_url'] %>" <% if node['apache']['version'] < "2.4" and !node['nagios']['ldap_authoritative'].nil? %>AuthzLDAPAuthoritative <%= node['nagios']['ldap_authoritative'] %><% end %> require <%= node['nagios']['server_auth_require'] %> <% else -%> AuthName "Nagios Server" AuthType Basic AuthUserFile "<%= node['nagios']['conf_dir'] %>/htpasswd.users" require <%= node['nagios']['server_auth_require'] %> <% unless node['nagios']['allowed_ips'].empty? -%> Order Deny,Allow Deny from All Allow from <%=node['nagios']['allowed_ips'].join(' ') %> Satisfy Any <% end -%> <% end -%> SetEnv TZ "<%= node['nagios']['conf']['use_timezone'] %>"