Skip to content

Commit a4006f5

Browse files
committed
add nginx.conf
1 parent 22a4c64 commit a4006f5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

nginx.conf

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
server {
2+
listen 80 default_server;
3+
server_name _;
4+
location / {
5+
return 301 https://$host:443$request_uri;
6+
}
7+
}
8+
9+
server {
10+
listen 443 ssl;
11+
server_name node-red.easypi.duckdns.org;
12+
ssl_certificate ssl/easypi.crt;
13+
ssl_certificate_key ssl/easypi.key;
14+
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
15+
ssl_ciphers HIGH:!aNULL:!MD5;
16+
location / {
17+
proxy_pass http://127.0.0.1:1880;
18+
proxy_http_version 1.1;
19+
proxy_set_header Connection "upgrade";
20+
proxy_set_header Host $host:$server_port;
21+
proxy_set_header Upgrade $http_upgrade;
22+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
23+
proxy_set_header X-Forwarded-Proto $scheme;
24+
proxy_set_header X-Real-IP $remote_addr;
25+
}
26+
}

0 commit comments

Comments
 (0)