-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlocamotion-nginx-config.conf
More file actions
45 lines (41 loc) · 1.29 KB
/
Copy pathlocamotion-nginx-config.conf
File metadata and controls
45 lines (41 loc) · 1.29 KB
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
server {
server_name mozilla.locamotion.org;
listen [::]:80;
return 301 https://$host$request_uri;
}
server {
server_name mozilla.locamotion.org;
# include includes/ssl;
# ssl_certificate /etc/ssl/certs/site_chained.crt;
# ssl_certificate_key /etc/ssl/private/site.key;
error_log /var/log/nginx/error-pootle.log info;
root /var/www/sites/mozilla/src/pootle;
# rest of the server section is optional, but helpful
# maintenance page if it exists
error_page 503 @maintenance;
if (-f $document_root/maintenance.html ) {
return 503;
}
location @maintenance {
try_files /maintenance.html =503;
}
location /assets {
try_files $uri =404;
}
# redirect credits URL to static page with copy of old credits
location /about/contributors/ {
return 301 https://$host/pages/contributors/;
}
location /downloads/ {
autoindex on;
}
location / {
include uwsgi_params;
uwsgi_param UWSGI_FASTROUTER_KEY $host;
uwsgi_pass unix:/var/www/sites/mozilla/pootle.sock;
# uploading files can be around 15MB, so give some slack...
client_max_body_size 20m;
# for files, pootle needs to sync to disk first, that takes a while
uwsgi_read_timeout 300;
}
}