77 lines
2.1 KiB
Text
77 lines
2.1 KiB
Text
<% if node['apache']['version'] != '2.4' -%>
|
|
NameVirtualHost *:<%= @params[:server_port] %>
|
|
<% end -%>
|
|
<VirtualHost *:<%= @params[:server_port] %>>
|
|
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.
|
|
<Files ".user.ini">
|
|
Require all denied
|
|
</Files>
|
|
|
|
# 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
|
|
|
|
<Directory <%= @params[:docroot] %>>
|
|
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 -%>
|
|
</Directory>
|
|
|
|
<Directory <%= @params[:docroot] %>/conf>
|
|
<% if node['apache']['version'] == '2.4' -%>
|
|
Require all denied
|
|
<% else -%>
|
|
Order deny,allow
|
|
Deny from all
|
|
<% end -%>
|
|
</Directory>
|
|
|
|
<Directory <%= @params[:docroot] %>/app>
|
|
<% if node['apache']['version'] == '2.4' -%>
|
|
Require all denied
|
|
<% else -%>
|
|
Order deny,allow
|
|
Deny from all
|
|
<% end -%>
|
|
</Directory>
|
|
|
|
<Directory <%= @params[:docroot] %>/include>
|
|
<% if node['apache']['version'] == '2.4' -%>
|
|
Require all denied
|
|
<% else -%>
|
|
Order deny,allow
|
|
Deny from all
|
|
<% end -%>
|
|
</Directory>
|
|
|
|
<Directory <%= @params[:docroot] %>/local>
|
|
<% if node['apache']['version'] == '2.4' -%>
|
|
Require all denied
|
|
<% else -%>
|
|
Order deny,allow
|
|
Deny from all
|
|
<% end -%>
|
|
</Directory>
|
|
|
|
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 -%>
|
|
</VirtualHost>
|