/
apache.conf
115 lines (101 loc) · 3.72 KB
/
apache.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Main Site
<VirtualHost *:80>
ServerName www.turbogears.org
ServerAlias beta.turbogears.org
ServerAlias turbogears.org
DocumentRoot /home/turbogearsorg/tgsite
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/turbogearsorg/tgsite/>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /home/turbogearsorg/tgsite/*/downloads/>
Options FollowSymLinks Indexes
IndexOptions VersionSort
</Directory>
<Directory /home/turbogearsorg/tgsite/videos/>
Options Indexes
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# Misc Services (Historical)
<VirtualHost *:80>
ServerName docs.turbogears.org
RedirectMatch permanent ^/(\d\.\d)/?$ http://www.turbogears.org/$1/docs/
RedirectMatch permanent ^/(\d\.\d)/(?:docs/)?(.+)(?:\.html)?(#.*)?(\?.*)?$ http://www.turbogears.org/$1/docs/$2.html$3$4
RedirectPermanent / http://www.turbogears.org/2.2/docs
</VirtualHost>
<VirtualHost *:80>
ServerName download.turbogears.org
RedirectMatch /(\d+\.\d+)(/.*)? http://www.turbogears.org/$1/downloads$2
RedirectMatch / http://www.turbogears.org/
</VirtualHost>
<VirtualHost *:80>
ServerName files.turbogears.org
RedirectMatch /(\d+\.\d+)(/.*)? http://www.turbogears.org/$1/downloads$2
RedirectMatch / http://www.turbogears.org/
</VirtualHost>
# Version Control Redirects (Git & SVN)
<VirtualHost *:80>
ServerName svn.turbogears.org
RedirectMatch /(/.*)? http://sourceforge.net/p/turbogears1/code/$1
</VirtualHost>
<VirtualHost *:80>
ServerName git.turbogears.org
RedirectMatch /(/.*)? https://github.com/TurboGears/tg2/$1
</VirtualHost>
<VirtualHost *:80>
ServerName git-tg2.turbogears.org
RedirectMatch /(/.*)? https://github.com/TurboGears/tg2/$1
</VirtualHost>
<VirtualHost *:80>
ServerName git-doc.turbogears.org
RedirectMatch /(/.*)? https://github.com/TurboGears/tg2docs/$1
</VirtualHost>
<VirtualHost *:80>
ServerName git-devtools.turbogears.org
RedirectMatch /(/.*)? https://github.com/TurboGears/tg2devtools/$1
</VirtualHost>
# planet tg
<VirtualHost *:80>
ServerName planet.turbogears.org
DocumentRoot /home/turbogearsorg/tgsite/planet
<Directory /home/turbogearsorg/tgsite/planet>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# package management redirects
<VirtualHost *:80>
ServerName tg.gy
RedirectMatch ^/(\d{1,2})(\d{1,2})(\d{1,2})(rc\d{1,2})(/index)?(.*?)$ http://www.turbogears.org/$1.$2/downloads/$1.$2.$3$4/index$6
RedirectMatch ^/(\d)(\d)(\d)(/index)?(.*?)$ http://www.turbogears.org/$1.$2/downloads/$1.$2.$3/index$5
RedirectMatch ^/(\d{1,2})(\d{1,2})(a\d{1,2}|b\d{1,2}|rc\d{1,2}|svn)(/index)?(.*?)$ http://www.turbogears.org/$1.$2/downloads/$1.$2$3/$5
RedirectMatch ^/(\d{1,2})\.(\d{1,2})\.(\d{1,2})(/index)?(.*?)$ http://www.turbogears.org/$1.$2/downloads/$1.$2.$3/index$5
RedirectMatch ^/(current|development|next)(/index)?(.*?)$ http://www.turbogears.org/2.2/downloads/$1/index$3
#RedirectMatch ^/(beta)(/index)?(.*?)$ http://www.turbogears.org/2.2/downloads/$1/index$3
RedirectMatch ^/(.*$) http://tg.gy/current/index/$1
ErrorLog /var/log/apache2/tg.gy-error.log
CustomLog /var/log/apache2/tg.gy-access.log combined
</VirtualHost>
# trac (historical)
<VirtualHost *:80>
ServerName trac.turbogears.org
ServerAlias tracnew.turbogears.org
WSGIScriptAlias / /home/turbogearsorg/siterepo/website/trac/trac.wsgi
<Directory /home/turbogearsorg/siterepo/website/trac>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
</VirtualHost>