-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathnginx-dev.conf
More file actions
39 lines (32 loc) · 878 Bytes
/
Copy pathnginx-dev.conf
File metadata and controls
39 lines (32 loc) · 878 Bytes
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
error_log /var/log/nginx/error.log crit;
events {}
http {
access_log off;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream website_backend {
server website:1313;
keepalive 32;
}
server {
listen 80;
# Websocket headers + http/1.1
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
proxy_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
location /dev-prefix/ {
# preserve full original URI (/dev-prefix/...)
proxy_pass http://website_backend;
}
# fallback
location / {
proxy_pass http://website_backend/dev-prefix/;
}
}
}