forked from JasminDreasond/pm2-gui-better
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpm.example.com.conf
More file actions
35 lines (28 loc) · 736 Bytes
/
pm.example.com.conf
File metadata and controls
35 lines (28 loc) · 736 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
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream pm2-gui {
server 127.0.0.1:8088;
}
server {
listen 80;
server_name pm2-gui.dev;
#useless but can not get rid of.
root /path/to/pm2-gui/web/public;
try_files $uri/index.html $uri.html $uri @app;
# paths
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://pm2-gui;
}
# socket.io
location /socket.io {
proxy_pass http://pm2-gui;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}