fd0d2fcc5a116422758e9c431a3c8036863b53bb
[mirror/dsa-puppet.git] / modules / roles / files / httpredir / httpredir.debian.org.conf
1 #<Proxy balancer://httredir-cluster>
2 #BalancerMember unix:/srv/httpredir.debian.org/sockets/starman|http://127.0.0.2/
3 ##BalancerMember http://127.0.0.1:5000/
4 ##BalancerMember http://127.0.0.1:5001/
5 ##BalancerMember http://127.0.0.1:5002/
6 ##BalancerMember http://127.0.0.1:5003/
7 ##BalancerMember http://127.0.0.1:5004/
8 ##BalancerMember http://127.0.0.1:5005/
9 ##BalancerMember http://127.0.0.1:5006/
10 ##BalancerMember http://127.0.0.1:5007/
11 ##BalancerMember http://127.0.0.1:5008/
12 ##BalancerMember http://127.0.0.1:5009/
13 ##BalancerMember http://127.0.0.1:5010/
14 #</Proxy>
15
16 <VirtualHost *:80>
17         ServerName httpredir.debian.org
18         ServerAdmin mirrors@debian.org
19         ServerAlias http.debian.net
20         ServerAlias http-master.debian.net
21         ServerAlias amd64-geomirror.debian.net
22         ServerAlias i386-geomirror.debian.net
23         ServerAlias sparc-geomirror.debian.net
24         ServerAlias powerpc-geomirror.debian.net
25         ServerAlias hurd-i386-geomirror.debian.net
26         ServerAlias arm-geomirror.debian.net
27         ServerAlias m68k-geomirror.debian.net
28         ServerAlias s390-geomirror.debian.net
29         ServerAlias alpha-geomirror.debian.net
30         ServerAlias hppa-geomirror.debian.net
31         ServerAlias ia64-geomirror.debian.net
32         ServerAlias mips-geomirror.debian.net
33         ServerAlias mipsel-geomirror.debian.net
34         ServerAlias http.non-free.org
35         ServerAlias ftp.non-free.org
36         ServerAlias mirror.debian.net
37         ServerAlias *.mirror.debian.net
38         ServerAlias cdn.debian.net
39
40         ErrorLog /var/log/apache2/httpredir.debian.org-error.log
41         LogLevel warn
42         #LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" \"%{Host}i\"" combined_host
43         CustomLog ${APACHE_LOG_DIR}/httpredir.debian.org-access.log privacy
44
45         #LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Location}o\" \"%{Referer}i\" \"%{User-Agent}i\"" combined_redirects
46         #CustomLog ${APACHE_LOG_DIR}/httpredir.debian.org-access.log combined_redirects
47
48         DocumentRoot /srv/httpredir.debian.org/www
49
50         <Directory />
51                 Options FollowSymLinks
52                 AllowOverride None
53         </Directory>
54         <Directory /srv/httpredir.debian.org/www/>
55                 Options Indexes FollowSymLinks MultiViews
56                 AllowOverride None
57                 Require all granted
58
59                 <Limit GET>
60                     Require all granted
61                 </Limit>
62                 <Limit PUT POST DELETE>
63                     Require all denied
64                 </Limit>
65         </Directory>
66
67 #       <Location /redir/>
68 #           Order allow,deny
69 #           allow from all
70 #       </Location>
71
72         RewriteEngine on
73
74         RewriteCond %{HTTP_HOST} \.non-?free\.org
75         RewriteRule ^/?debian/(?:dists/[^/]{1,40}|pool)/main/? http://www.non-free.org/ [R=404,L]
76         RewriteCond %{HTTP_HOST} \.non-?free\.org
77         RewriteRule ^/?(?:index\.html)?$ http://www.non-free.org/ [R=301,L]
78
79         #ProxyPass /redir-bay9NBKG balancer://httredir-cluster
80         ProxyPass /redir-bay9NBKG unix:/srv/httpredir.debian.org/sockets/starman|http://127.0.0.2/
81         #ProxyPass /redir-bay9NBKG http://127.0.0.1:5000/
82
83         RewriteRule ^/?(?:(demo)/)?debian-(security|backports)/(.*) /redir-bay9NBKG/?mirror=$2&url=$3&action=$1 [PT]
84         RewriteRule ^/?(?:(demo)/)?debian-archive/(.*) /redir-bay9NBKG/?mirror=old&url=$2&action=$1 [PT]
85         RewriteRule ^/?(?:(demo)/)?debian/(.*) /redir-bay9NBKG/?mirror=archive&url=$2&action=$1 [PT]
86         
87         # mirror:// method support:
88         RewriteRule ^/?debian-(security|backports)\.list(?:$|\?(.+)) /redir-bay9NBKG/?mirror=$1.list$2 [QSA,PT]
89         RewriteRule ^/?debian-archive\.list(?:$|\?(.+)) /redir-bay9NBKG/?mirror=old.list$1 [QSA,PT]
90         RewriteRule ^/?debian\.list(?:$|\?(.+)) /redir-bay9NBKG/?mirror=archive.list$1 [QSA,PT]
91 </VirtualHost>