system-config/modules/openstack_project/templates/logs.vhost.erb
James E. Blair cfa1be910f Serve gz html/txt files from logs.o.o.
Change-Id: I9c5405dcf19af6a48f39848fbb4f140e7e38dc48
Reviewed-on: https://review.openstack.org/13189
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-09-18 18:56:39 +00:00

35 lines
983 B
Plaintext

# ************************************
# 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 %>
<FilesMatch \.txt\.gz$>
ForceType text/plain
AddDefaultCharset UTF-8
AddEncoding x-gzip gz
</FilesMatch>
<FilesMatch \.html\.gz$>
ForceType text/html
AddDefaultCharset UTF-8
AddEncoding x-gzip gz
</FilesMatch>
<Directory <%= docroot %>>
Options <%= options %>
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/<%= name %>_error.log
LogLevel warn
CustomLog /var/log/apache2/<%= name %>_access.log combined
ServerSignature Off
</VirtualHost>