Merge "Corrected mod_rewrite in pypi mirror"
This commit is contained in:
commit
3d68f4717d
@ -22,16 +22,20 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
# Pypi URL's are:
|
||||
# /pypi/simple/a/a/a-etc.whl
|
||||
# /pypi/simple/a/abcd/abcd-etc.whl
|
||||
# /pypi/simple/a/abcde/abcde-etc.whl
|
||||
RewriteEngine On
|
||||
RewriteRule ^/pypi/simple/([^/])([^/]*)$ /pypi/simple/$1/$1$2 [L]
|
||||
RewriteRule ^/pypi/simple/([^/])([^/]*)/(.*)$ /pypi/simple/$1/$1$2/$3 [L]
|
||||
|
||||
# Pypi's bandersnatch URL's are:
|
||||
# /pypi/simple/index.html
|
||||
# /pypi/simple/a/a/(index.html)?
|
||||
# /pypi/simple/a/a/a-etc.whl
|
||||
# /pypi/simple/a/abcd/(index.html)?
|
||||
# /pypi/simple/a/abcd/abcd-etc.whl
|
||||
RewriteCond %{REQUEST_URI} ^/pypi/simple/([^/])([^/]*)
|
||||
RewriteCond %{DOCUMENT_ROOT}/pypi/simple/$1/$1$2 -d
|
||||
RewriteRule ^/pypi/simple/([^/])([^/]*)(/.*)?$ /pypi/simple/$1/$1$2$3 [L]
|
||||
|
||||
ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
|
||||
LogLevel warn
|
||||
CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_access.log combined
|
||||
ServerSignature Off
|
||||
</VirtualHost>
|
||||
</VirtualHost>
|
||||
|
Loading…
x
Reference in New Issue
Block a user