summaryrefslogtreecommitdiff
path: root/templates/vhost-default.conf.erb
blob: 2cb96d5e0f9fa2ada5296eb228aea96eb0688f22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# ************************************
# Default template in module openstackinfra-httpd
# Managed by Puppet
# ************************************

NameVirtualHost <%= @vhost_name %>:<%= @port %>
<VirtualHost <%= @vhost_name %>:<%= @port %>>
  ServerName <%= @srvname %>
<% if @serveraliases.is_a? Array -%>
<% @serveraliases.each do |name| -%><%= "  ServerAlias #{name}\n" %><% end -%>
<% elsif @serveraliases != '' -%>
<%= "  ServerAlias #{@serveraliases}" -%>
<% end -%>
  DocumentRoot <%= @docroot %>
  <Directory <%= @docroot %>>
    Options <%= @options %>
    AllowOverride None
    Order allow,deny
    allow from all
  </Directory>
  ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
  LogLevel warn
  CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_access.log combined
  ServerSignature Off
</VirtualHost>