-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
40 lines (34 loc) · 950 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
38
39
40
user www-data;
worker_processes auto;
pid /run/nginx.pid;
http {
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
upstream challenge-nodejs {
server 127.0.0.1:3001;
}
server {
listen 80;
root /home/monkeymusic/mmc/public;
server_name competition.monkeymusicchallenge.com;
location / {
# proxy requests to Node.js server
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_pass http://challenge-nodejs;
# show error page if Node.js server is down
proxy_intercept_errors on;
error_page 502 /error.html;
}
# needed for serving error page from disk
location /error.html {
}
}
}
# needed, but use defaults
events {
}