anchor.diff:  <% end -%>
     ScriptAlias /cgi-bin/<%= node['nagios']['server']['vname'] %> /usr/lib/cgi-bin/<%= node['nagios']['server']['vname'] %>
   
  -  <% if @https -%>
  +<% if @https -%>
     SSLEngine On
     SSLProtocol all -SSLv3 -SSLv2
     SSLCertificateFile <%= @ssl_cert_file %>
  -  <% if node['nagios']['ssl_cert_chain_file'] %>
  +<% if node['nagios']['ssl_cert_chain_file'] %>
     SSLCertificateChainFile <%= node['nagios']['ssl_cert_chain_file'] %>
  -  <% end -%>
  +<% end -%>
     SSLCertificateKeyFile <%= @ssl_cert_key %>
  -  <% end -%>
   
  +<% end -%>
   <% case node['nagios']['server_auth_method'] -%>
   <% when "openid" -%>
     <Location />
  
positive.code:   SetEnv TZ "<%= node['nagios']['timezone'] %>"
  
    RewriteEngine On
    <% if node['nagios']['server']['redirect_root'] -%>
    RewriteRule ^/$ /<%= node['nagios']['server']['vname'] %> [R=301,L]
    <% end -%>
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
    RewriteRule ^(.*)index\.html$ $1 [R=301,L]
  </VirtualHost>
  
negative.code: 
  <VirtualHost *:<%= node['nagios']['http_port'] %>>
    ServerAdmin     <%= node['nagios']['sysadmin_email'] %>
  <% if @nagios_url %>
    ServerName <%= @nagios_url %>
  <% else %>
    ServerName      <%= node['fqdn'] %>
    ServerAlias     <%= node['nagios']['server']['name'] %> <%= node['nagios']['server']['name'] %>.<%= node.chef_environment =~ /^_default$/ ? "default" : node.chef_environment%>.<%= @public_domain %>
  <% end %>
    DocumentRoot    <%= node['nagios']['docroot'] %>
    CustomLog       <%= node['nagios']['log_dir'] %>/apache_access.log combined
    ErrorLog        <%= node['nagios']['log_dir'] %>/apache_error.log
  