<% if node['apache']['version'] != '2.4' -%> NameVirtualHost *:<%= @params[:server_port] %> <% end -%> > ServerName <%= @params[:server_name] %> <% if @params[:server_aliases] -%> ServerAlias <%= @params[:server_aliases].join " " %> <% end -%> DocumentRoot <%= @params[:docroot] %> # The following lines prevent .user.ini files from being viewed by Web clients. Require all denied # Allow php to handle Multiviews. AddType text/html .php # Enable http authorization headers. SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9001/usr/share/zabbix/$1 > Options <%= [@params[:directory_options] || "FollowSymLinks" ].flatten.join " " %> AllowOverride <%= [@params[:allow_override] || "None" ].flatten.join " " %> <% if node['apache']['version'] == '2.4' -%> Require all granted <% else -%> Order allow,deny Allow from all <% end -%> /conf> <% if node['apache']['version'] == '2.4' -%> Require all denied <% else -%> Order deny,allow Deny from all <% end -%> /app> <% if node['apache']['version'] == '2.4' -%> Require all denied <% else -%> Order deny,allow Deny from all <% end -%> /include> <% if node['apache']['version'] == '2.4' -%> Require all denied <% else -%> Order deny,allow Deny from all <% end -%> /local> <% if node['apache']['version'] == '2.4' -%> Require all denied <% else -%> Order deny,allow Deny from all <% end -%> ErrorLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-error.log CustomLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-access.log combined <% if @params[:directory_index] -%> DirectoryIndex <%= [@params[:directory_index]].flatten.join " " %> <% end -%>