Merge "enable htmlify on main log vhost"

This commit is contained in:
Jenkins 2013-08-12 20:59:19 +00:00 committed by Gerrit Code Review
commit d7430126f7

View File

@ -1,3 +1,4 @@
# -*- apache -*-
# ************************************ # ************************************
# Managed by Puppet # Managed by Puppet
# ************************************ # ************************************
@ -11,11 +12,12 @@ NameVirtualHost <%= vhost_name %>:<%= port %>
<%= " ServerAlias #{serveraliases}" %> <%= " ServerAlias #{serveraliases}" %>
<% end -%> <% end -%>
DocumentRoot <%= docroot %> DocumentRoot <%= docroot %>
<FilesMatch \.txt\.gz$>
ForceType text/plain # use Apache to compress the results afterwards, to save on the wire
AddDefaultCharset UTF-8 # it's approx 18x savings of wire traffic to compress. We need to
AddEncoding x-gzip gz # compress by content types that htmlify can produce
</FilesMatch> AddOutputFilterByType DEFLATE text/plain text/html
<FilesMatch \.html\.gz$> <FilesMatch \.html\.gz$>
ForceType text/html ForceType text/html
AddDefaultCharset UTF-8 AddDefaultCharset UTF-8
@ -55,6 +57,11 @@ NameVirtualHost <%= vhost_name %>:<%= port %>
ReadmeName /help/tempest-logs.html ReadmeName /help/tempest-logs.html
</Directory> </Directory>
RewriteEngine On
# rewrite all txt.gz files to map to our internal htmlify wsgi app
RewriteRule ^/(.*\.txt\.gz)$ /htmlify/$1 [QSA,L,PT]
WSGIScriptAlias /htmlify /usr/local/bin/htmlify-screen-log.py
ErrorLog /var/log/apache2/<%= name %>_error.log ErrorLog /var/log/apache2/<%= name %>_error.log
LogLevel warn LogLevel warn
CustomLog /var/log/apache2/<%= name %>_access.log combined CustomLog /var/log/apache2/<%= name %>_access.log combined