-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
37 lines (33 loc) · 887 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
server_tokens off;
server {
listen 80 default_server;
client_max_body_size 100M;
large_client_header_buffers 4 32k;
charset utf-8;
# Front
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
}
# API
location /api/ {
proxy_pass http://api:8000/api/;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
# Events
location /socket.io/ {
proxy_pass http://api:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
}
}