diff --git a/files/os-loganalyze-file_conditions.yaml b/files/os-loganalyze-file_conditions.yaml index 534dbe1..a3cf65c 100644 --- a/files/os-loganalyze-file_conditions.yaml +++ b/files/os-loganalyze-file_conditions.yaml @@ -2,6 +2,9 @@ conditions: - filename_pattern: ^.*\.txt(\.gz)?$ filter: SevFilter view: HTMLView + - filename_pattern: ^.*\.log(\.gz)?$ + filter: SevFilter + view: HTMLView - filename_pattern: ^.*console\.html(\.gz)?$ filter: SevFilter view: HTMLView diff --git a/templates/logs.vhost.erb b/templates/logs.vhost.erb index 436fc82..4c5d039 100644 --- a/templates/logs.vhost.erb +++ b/templates/logs.vhost.erb @@ -84,15 +84,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