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
This commit is contained in:
parent
0c25c7bce2
commit
cfa1be910f
@ -33,6 +33,7 @@ class openstack_project::static (
|
|||||||
priority => '50',
|
priority => '50',
|
||||||
docroot => '/srv/static/logs',
|
docroot => '/srv/static/logs',
|
||||||
require => File['/srv/static/logs'],
|
require => File['/srv/static/logs'],
|
||||||
|
template => 'openstack_project/logs.vhost.erb',
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/srv/static':
|
file { '/srv/static':
|
||||||
|
34
modules/openstack_project/templates/logs.vhost.erb
Normal file
34
modules/openstack_project/templates/logs.vhost.erb
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# ************************************
|
||||||
|
# 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>
|
Loading…
x
Reference in New Issue
Block a user