upstream nodebb server 127 3000 the nginx server instance server liste

 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
50
51
52
53
54
55
56
57
58
upstream nodebb {
server 127.0.0.1:3000;
}
# the nginx server instance
server {
listen 0.0.0.0:80;
server_name community.appnext.com;
root /var/www/nodebb;
access_log /var/log/nginx/nodebb.log;
location /google00ad69e605671a48.html {
alias /var/www/nodebb/google00ad69e605671a48.html;
}
# pass the request to the node.js server with the correct headers and much more can be added, see nginx config options
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://nodebb/;
proxy_redirect off;
}
}
server {
listen 0.0.0.0:80;
server_name community-a.appnext.com;
root /var/www/nodebb;
access_log /var/log/nginx/nodebb.log;
location /google00ad69e605671a48.html {
alias /var/www/nodebb/google00ad69e605671a48.html;
}
location / {
try_files $uri $uri/ /index.html;
}
# pass the request to the node.js server with the correct headers and much more can be added, see nginx config options
#location / {
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $http_host;
# proxy_set_header X-NginX-Proxy true;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# proxy_pass http://nodebb/;
# proxy_redirect off;
#}
}