47fb93b4f2413b891d09399622bbf0d9de6107da
[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         #LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" \"%{Host}i\"" combined_host
42         CustomLog ${APACHE_LOG_DIR}/httpredir.debian.org-access.log privacy
43
44         #LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Location}o\" \"%{Referer}i\" \"%{User-Agent}i\"" combined_redirects
45         #CustomLog ${APACHE_LOG_DIR}/httpredir.debian.org-access.log combined_redirects
46
47         DocumentRoot /srv/httpredir.debian.org/www
48
49         <Directory />
50                 Options FollowSymLinks
51                 AllowOverride None
52         </Directory>
53         <Directory /srv/httpredir.debian.org/www/>
54                 Options Indexes FollowSymLinks MultiViews
55                 AllowOverride None
56                 Require all granted
57
58                 <Limit GET>
59                     Require all granted
60                 </Limit>
61                 <Limit PUT POST DELETE>
62                     Require all denied
63                 </Limit>
64         </Directory>
65
66 #       <Location /redir/>
67 #           Order allow,deny
68 #           allow from all
69 #       </Location>
70
71         RewriteEngine on
72
73         RewriteCond %{HTTP_HOST} \.non-?free\.org
74         RewriteRule ^/?debian/(?:dists/[^/]{1,40}|pool)/main/? http://www.non-free.org/ [R=404,L]
75         RewriteCond %{HTTP_HOST} \.non-?free\.org
76         RewriteRule ^/?(?:index\.html)?$ http://www.non-free.org/ [R=301,L]
77
78         #ProxyPass /redir-bay9NBKG balancer://httredir-cluster
79         ProxyPass /redir-bay9NBKG unix:/srv/httpredir.debian.org/sockets/starman|http://127.0.0.2/
80         #ProxyPass /redir-bay9NBKG http://127.0.0.1:5000/
81
82         RewriteRule ^/?(?:(demo)/)?debian-(security|backports)/(.*) /redir-bay9NBKG/?mirror=$2&url=$3&action=$1 [PT]
83         RewriteRule ^/?(?:(demo)/)?debian-archive/(.*) /redir-bay9NBKG/?mirror=old&url=$2&action=$1 [PT]
84         RewriteRule ^/?(?:(demo)/)?debian/(.*) /redir-bay9NBKG/?mirror=archive&url=$2&action=$1 [PT]
85         
86         # mirror:// method support:
87         RewriteRule ^/?debian-(security|backports)\.list(?:$|\?(.+)) /redir-bay9NBKG/?mirror=$1.list$2 [QSA,PT]
88         RewriteRule ^/?debian-archive\.list(?:$|\?(.+)) /redir-bay9NBKG/?mirror=old.list$1 [QSA,PT]
89         RewriteRule ^/?debian\.list(?:$|\?(.+)) /redir-bay9NBKG/?mirror=archive.list$1 [QSA,PT]
90 </VirtualHost>