-
Notifications
You must be signed in to change notification settings - Fork 38
/
apache-site
147 lines (130 loc) · 4.57 KB
/
apache-site
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName osmose.openstreetmap.fr
ServerAlias osmose.openstreetmap.lu
Timeout 1200
WSGIDaemonProcess osmose processes=5 threads=6 user=osmose group=osmose maximum-requests=1000 graceful-timeout=600 python-path=/data/project/osmose/frontend/osmose-frontend-venv/lib/python3.9/site-packages
WSGIScriptAlias / /data/project/osmose/frontend/osmose.wsgi process-group=osmose application-group=%{GLOBAL}
WSGIProcessGroup osmose
WSGIDaemonProcess osmose-update processes=3 threads=5 user=osmose group=osmose maximum-requests=200 graceful-timeout=600 python-path=/data/project/osmose/frontend/osmose-frontend-venv/lib/python3.9/site-packages
WSGIScriptAlias /control/send-update /data/project/osmose/frontend/osmose.wsgi process-group=osmose-update application-group=%{GLOBAL}
DocumentRoot /data/project/osmose/frontend/web/static/
Alias /robots.txt /data/project/osmose/frontend/web/static/robots.txt
Alias /favicon.ico /data/project/osmose/frontend/web/static/favicon.ico
Alias /export /data/work/osmose/export
CacheIgnoreHeaders Cookie Set-Cookie
<Location />
Require all granted
</Location>
<Directory /data/project/osmose/frontend/web/static/>
AddDefaultCharset UTF-8
AddHandler cgi-script .py
Options FollowSymLinks Indexes MultiViews
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride None
DirectoryIndex index.html index.py
</Directory>
<Directory /data/work/osmose/export/>
AddDefaultCharset UTF-8
Options FollowSymLinks Indexes MultiViews
AllowOverride None
DirectoryIndex index.html
</Directory>
ExpiresActive On
ExpiresDefault "access plus 1 week"
<LocationMatch /[a-z_]+/api>
ExpiresActive Off
CacheDisable on
</LocationMatch>
<LocationMatch /[a-z_]+/byuser>
ExpiresDefault "access plus 5 minutes"
</LocationMatch>
<LocationMatch /[a-z_]+/control>
ExpiresDefault "access plus 5 minutes"
</LocationMatch>
<LocationMatch /[a-z_]+/error>
ExpiresActive Off
CacheDisable on
</LocationMatch>
<LocationMatch /[a-z_]+/errors>
ExpiresDefault "access plus 5 minutes"
</LocationMatch>
<LocationMatch /[a-z_]+/map>
ExpiresActive Off
CacheDisable on
</LocationMatch>
<LocationMatch /[a-z_]+/map/.*.js>
ExpiresActive On
ExpiresDefault "access plus 3 months"
CacheEnable disk
CacheHeader on
</LocationMatch>
<LocationMatch /0\.3/issues/[0-9]+/[0-9]+/[0-9]+\.heat\.mvt>
ExpiresDefault "access plus 1 day"
CacheEnable disk
CacheHeader on
</LocationMatch>
<LocationMatch /0\.3/issues/[0-9]+/[0-9]+/[0-9]+\.mvt>
ExpiresDefault "access plus 2 minutes"
CacheEnable disk
CacheHeader on
</LocationMatch>
<LocationMatch /[a-z_]+/map/issues/>
ExpiresActive On
ExpiresDefault "access plus 2 minutes"
CacheEnable disk
CacheHeader on
</LocationMatch>
<LocationMatch /[a-z_]+/map/issues/[0-9]/*>
ExpiresDefault "access plus 1 day"
CacheEnable disk
CacheHeader on
</LocationMatch>
<LocationMatch /[a-z_]+/map/issues/1[0-9]/*>
ExpiresActive On
ExpiresDefault "access plus 20 seconds"
CacheEnable disk
CacheHeader on
</LocationMatch>
<LocationMatch /[a-z_]+/map/marker>
ExpiresActive Off
CacheDisable on
</LocationMatch>
<LocationMatch /[a-z_]+/map/markers>
ExpiresActive Off
CacheDisable on
</LocationMatch>
<LocationMatch ".*.rss$" >
ExpiresActive On
ExpiresDefault "access plus 12 hours"
CacheEnable disk
CacheHeader on
</LocationMatch>
<LocationMatch /api/0\.3/items/[0-9]*/class/[0-9]*>
ExpiresDefault "access plus 60 minutes"
</LocationMatch>
<LocationMatch /assets/.*>
ExpiresDefault "access plus 30 days"
ExpiresActive On
CacheEnable disk
CacheHeader on
Header merge Cache-Control "public, immutable"
</LocationMatch>
RewriteEngine On
# RewriteCond %{REQUEST_URI} !/maintenance.html$
# RewriteRule !^maintenance.html$ maintenance.html [R=302,L]
RewriteRule "^(/api/0.2/.*)" "/en$1" [PT]
RewriteRule "^/([a-z_]+)(/api/0\.3/.*)" "$2?%{QUERY_STRING}&langs=$1" [PT]
RewriteRule "^/([a-z_]+)/error/(.*)" "/$1/issue/$2?%{QUERY_STRING}" [R,L]
RewriteRule "^/([a-z_]+)/errors/done(.*)" "/$1/issues/done$2" [R,L]
RewriteRule "^/([a-z_]+)/errors/false-positive(.*)" "/$1/issues/false-positive$2" [R,L]
RewriteRule "^/([a-z_]+)/errors(.*)" "/$1/issues/open$2" [R,L]
# RewriteRule "^/([a-z_]+)(/images/.*)" "$2" [R,L]
RewriteRule ^/oauth$ /en/oauth [PT]
RewriteRule ^/$ /map/ [R,L]
RewriteRule ^/map/cgi-bin/index.py$ /map [R,L]
ErrorLog /var/log/apache2/osmose-error.log
LogLevel warn
CustomLog /var/log/apache2/osmose-access.log combined
ServerSignature On
</VirtualHost>