projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
action RT#7389 - debconf19.debconf.org setup
[mirror/dsa-puppet.git]
/
modules
/
roles
/
templates
/
static-mirroring
/
vhost
/
manpages.debian.org.erb
diff --git
a/modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb
b/modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb
index
b553829
..
c4983a9
100644
(file)
--- a/
modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb
+++ b/
modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb
@@
-10,9
+10,14
@@
SetEnvIf Accept-Language "^$" ACCLANG=en INITIAL=t
RewriteEngine on
SetEnvIf Accept-Language "^$" ACCLANG=en INITIAL=t
RewriteEngine on
- RewriteMap manpagesall dbm:/srv/
manpages.debian.org/www
/rwmap.dbm
+ RewriteMap manpagesall dbm:/srv/
static.debian.org/mirrors/manpages.debian.org/cur
/rwmap.dbm
RewriteMap lc int:tolower
RewriteMap lc int:tolower
+ # Redirect old CGI paths (without CGI file name), keeping at least the
+ # manpage (the other parameters are left out for simplicity).
+ RewriteCond %{QUERY_STRING} (?:.*(?:^|&))query=([^&]+)
+ RewriteRule ^/?$ /%1 [redirect=307,qsdiscard,last]
+
# URLs which end in a slash do not need to be rewritten
RewriteRule /$ - [last]
# URLs which end in a slash do not need to be rewritten
RewriteRule /$ - [last]
@@
-85,6
+90,12
@@
Require all denied
</Files>
Require all denied
</Files>
+ # DefaultType doesn’t work since Apache 2.3.x, so we need to match
+ # non-HTML files to work around https://bugs.debian.org/880542
+ <FilesMatch "(?<!\.html)\.gz$">
+ ForceType text/plain
+ </FilesMatch>
+
# To set the correct Content-Type (e.g. text/html).
RemoveType .gz
AddEncoding gzip gz
# To set the correct Content-Type (e.g. text/html).
RemoveType .gz
AddEncoding gzip gz