From 6b351d7fa17809b9acdb6f17cd8d37465693bcca Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Wed, 4 Apr 2018 11:46:16 -0400 Subject: [PATCH] Synchronize vhost configuration between logs.o.o and logs-dev.o.o It seems the vhost configurations have slightly diverged over time. Let's synchronize them so we're able to test things accurately. Change-Id: Ic921fcb3a310fbb9f728d73390d7740455ca4414 --- templates/logs-dev.vhost.erb | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/templates/logs-dev.vhost.erb b/templates/logs-dev.vhost.erb index 0700b5c..bd11bde 100644 --- a/templates/logs-dev.vhost.erb +++ b/templates/logs-dev.vhost.erb @@ -17,6 +17,11 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %> WSGIProcessGroup logs-dev WSGIApplicationGroup %{GLOBAL} + AddType text/plain .log + AddType text/plain .sh + AddType text/plain .yaml + AddType text/plain .yml + # use Apache to compress the results afterwards, to save on the wire # it's approx 18x savings of wire traffic to compress. We need to # compress by content types that htmlify can produce @@ -45,6 +50,15 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %> ForceType image/svg+xml AddEncoding x-gzip gz + + ForceType application/json + AddEncoding x-gzip gz + + + # mod_mime_magic is sometimes passing css files as asm sources + # e.g css files generated by coverage reports + ForceType text/css + > Options <%= @options %> AllowOverride None @@ -63,6 +77,10 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %> <% end -%> + /periodic*/*> + IndexOrderDefault Descending Date + + RewriteEngine On <% if @ara_middleware -%> @@ -96,15 +114,15 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %> RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.gz -f RewriteRule ^/(.*)$ %{REQUEST_URI}.gz - # rewrite txt.gz & console.html[.gz] files to map to our internal htmlify - # wsgi app + # rewrite (txt|log).gz & console.html[.gz] files to map to our + # internal htmlify wsgi app # PT, Pass-through: to come back around and get picked up by the # WSGIScriptAlias # NS, No-subrequest: on coming back through, mod-autoindex may have added # index.html which would match the !-f condition. We # therefore ensure the rewrite doesn't trigger by # disallowing subrequests. - RewriteRule ^/(.*\.txt\.gz)$ /htmlify/$1 [QSA,L,PT,NS] + RewriteRule ^/(.*\.(txt|log)\.gz)$ /htmlify/$1 [QSA,L,PT,NS] RewriteRule ^/(.*console\.html(\.gz)?)$ /htmlify/$1 [QSA,L,PT,NS] # Check if the request exists as a file, directory or symbolic link