Fix the apache rules for fetching from swift
Change-Id: I8c1a39a65dc1eefc782664ea5f020150821ebce6
This commit is contained in:
parent
9f4ae44e6e
commit
7244de8baf
@ -59,8 +59,12 @@ NameVirtualHost <%= vhost_name %>:<%= port %>
|
|||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
# rewrite all txt.gz & html.gz files to map to our internal htmlify wsgi app
|
# rewrite all txt.gz & html.gz files to map to our internal htmlify wsgi app
|
||||||
RewriteRule ^/(.*\.txt\.gz)$ /htmlify/$1 [QSA,L,PT]
|
# PT, Pass-through: to come back around and get picked up by the WSGIScriptAlias
|
||||||
RewriteRule ^/(.*console\.html(\.gz)?)$ /htmlify/$1 [QSA,L,PT]
|
# 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 ^/(.*console\.html(\.gz)?)$ /htmlify/$1 [QSA,L,PT,NS]
|
||||||
|
|
||||||
# Check if the request exists as a file, directory or symbolic link
|
# Check if the request exists as a file, directory or symbolic link
|
||||||
# If not, write the request to htmlify to see if we can fetch from swift
|
# If not, write the request to htmlify to see if we can fetch from swift
|
||||||
@ -68,7 +72,7 @@ NameVirtualHost <%= vhost_name %>:<%= port %>
|
|||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l
|
||||||
RewriteCond %{REQUEST_FILENAME} !^/icon
|
RewriteCond %{REQUEST_FILENAME} !^/icon
|
||||||
RewriteRule ^/(.*)$ /htmlify/$1 [QSA,L]
|
RewriteRule ^/(.*)$ /htmlify/$1 [QSA,L,PT,NS]
|
||||||
|
|
||||||
WSGIScriptAlias /htmlify /usr/local/lib/python2.7/dist-packages/os_loganalyze/wsgi.py
|
WSGIScriptAlias /htmlify /usr/local/lib/python2.7/dist-packages/os_loganalyze/wsgi.py
|
||||||
|
|
||||||
|
@ -59,8 +59,12 @@ NameVirtualHost <%= vhost_name %>:<%= port %>
|
|||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
# rewrite all txt.gz & html.gz files to map to our internal htmlify wsgi app
|
# rewrite all txt.gz & html.gz files to map to our internal htmlify wsgi app
|
||||||
RewriteRule ^/(.*\.txt\.gz)$ /htmlify/$1 [QSA,L,PT]
|
# PT, Pass-through: to come back around and get picked up by the WSGIScriptAlias
|
||||||
RewriteRule ^/(.*console\.html(\.gz)?)$ /htmlify/$1 [QSA,L,PT]
|
# 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 ^/(.*console\.html(\.gz)?)$ /htmlify/$1 [QSA,L,PT,NS]
|
||||||
|
|
||||||
# Check if the request exists as a file, directory or symbolic link
|
# Check if the request exists as a file, directory or symbolic link
|
||||||
# If not, write the request to htmlify to see if we can fetch from swift
|
# If not, write the request to htmlify to see if we can fetch from swift
|
||||||
@ -68,7 +72,7 @@ NameVirtualHost <%= vhost_name %>:<%= port %>
|
|||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l
|
||||||
RewriteCond %{REQUEST_FILENAME} !^/icon
|
RewriteCond %{REQUEST_FILENAME} !^/icon
|
||||||
RewriteRule ^/(.*)$ /htmlify/$1 [QSA,L]
|
RewriteRule ^/(.*)$ /htmlify/$1 [QSA,L,PT,NS]
|
||||||
|
|
||||||
WSGIScriptAlias /htmlify /usr/local/lib/python2.7/dist-packages/os_loganalyze/wsgi.py
|
WSGIScriptAlias /htmlify /usr/local/lib/python2.7/dist-packages/os_loganalyze/wsgi.py
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user