-
Notifications
You must be signed in to change notification settings - Fork 11
/
boss_nginx.conf
48 lines (36 loc) · 1.28 KB
/
boss_nginx.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
# the upstream component nginx needs to connect to
upstream django {
# move to /var/run/boss/boss.sock, requires making files with Salt
server unix:///tmp/boss.sock; # for a file socket
}
# configuration of the server
server {
# Listen to http2 port. All http requests will automatically be re-routed to http2 by loadbalancer.
# No IPv6 ports necessary. Subnet between loadbalancer and endpoint is in IPv4 only.
listen 443 ssl http2;
charset utf-8;
include snippets/self-signed.conf;
include snippets/ssl-params.conf;
# max upload size
client_max_body_size 550M; # Slightly larger than where API will return reasonable error message
# Django media
location /media {
alias /var/www/media;
}
# Django static
location /static {
alias /var/www/static;
autoindex on;
allow all;
}
# Finally, send all non-media requests to the Django server.
location / {
#rewrite ^/boss/(.*)$ /$1 break;
uwsgi_pass django;
include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed
uwsgi_read_timeout 600;
}
location /latest {
rewrite ^/latest(.*)$ /v1$1 last;
}
}