Skip to content

Commit 78d178f

Browse files
committed
Nginx:SSL Reroute traffic HTTPS 8443
1 parent fc0aecc commit 78d178f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

config/nginx.conf

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
events {}
2+
http {
3+
server {
4+
listen [::]:80;
5+
location / {
6+
return 301 https://$host$request_uri;
7+
}
8+
}
9+
10+
server {
11+
server_name $host;
12+
listen [::]:443 ssl default_server;
13+
ssl_certificate /etc/nginx/certs/ssl.crt;
14+
ssl_certificate_key /etc/nginx/certs/ssl.key;
15+
ssl_protocols TLSv1.1 TLSv1.2;
16+
ssl_prefer_server_ciphers on;
17+
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5;
18+
19+
location / {
20+
proxy_pass http://code:8443/;
21+
proxy_set_header Host $host;
22+
proxy_set_header X-Real-IP $remote_addr;
23+
proxy_set_header Upgrade $http_upgrade;
24+
proxy_set_header Connection upgrade;
25+
proxy_set_header Accept-Encoding gzip;
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)