-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
39 lines (34 loc) · 1.18 KB
/
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
gzip on;
gzip_vary on;
gzip_comp_level 7;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css image/jpg image/jpeg image/png image/svg+xml image/gif;
server {
client_max_body_size 0;
listen 80;
server_name localhost;
root /var/orcafs-gui/build;
index index.html;
set $socket http://127.0.0.1:3456;
set $api http://127.0.0.1:3456;
location / {
try_files $uri /index.html;
}
location ~ ^/socket.io(?:/(.*))?$ {
proxy_pass $socket;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Connection 'upgrade';
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location ~ ^/api(?:/(.*))?$ {
proxy_pass $api;
proxy_set_header Host $host;
proxy_set_header Connection '';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}