summaryrefslogtreecommitdiff
path: root/templates/vhost-proxy.conf.erb
blob: 05c6a8a422fd75926cecc3796a030662f06967e9 (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
27
28
NameVirtualHost <%= @vhost_name %>:<%= @port %>
<VirtualHost <%= @vhost_name %>:<%= @port %>>
  <% if @ssl == true %>
  SSLEngine on
  SSLCertificateFile <%= @ssl_path %>/certs/pl.cert
  SSLCertificateKeyFile <%= @ssl_path %>/private/pl.key
  <% end %>
  ServerName <%= @srvname %>
<% if @serveraliases.is_a? Array %>
<% @serveraliases.each do |name| %><%= "  ServerAlias #{name}\n" %><% end %>
<% elsif @serveraliases != nil %>
<%= "  ServerAlias #{@serveraliases}" %>
<% end %>
   ProxyRequests Off
   <Proxy *>
     Order deny,allow
     Allow from all
   </Proxy>
   ProxyPass        / <%= @dest %>/
   ProxyPassReverse / <%= @dest %>/
   ProxyPreserveHost On 

   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

</VirtualHost>