-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
50 lines (39 loc) · 948 Bytes
/
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
45
46
47
48
49
upstream swampdragon {
server 0.0.0.0:9000;
server 0.0.0.0:9001;
}
upstream django_prod {
server unix:///tmp/conference.sock;
}
proxy_next_upstream off;
server {
listen 80;
server_name conference.lab;
error_log /var/log/nginx/conference-error.log;
access_log /var/log/nginx/conference-access.log;
root /home/vagrant/conference;
location /media {
alias /home/vagrant/conference/media/;
}
location /static {
alias /home/vagrant/conference/static/;
}
location / {
include uwsgi_params;
uwsgi_pass django_prod;
}
}
server {
listen 80;
server_name sd.conference.lab;
# WebSocket.
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header Host $http_host;
proxy_pass http://swampdragon;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}