41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
map $http_upgrade $connection_upgrade {
|
|
default keep-alive;
|
|
'websocket' upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
|
|
listen 22443 ssl http2;
|
|
listen [::]:22443 ssl http2;
|
|
|
|
ssl_certificate /etc/nginx/conf.d/ssl_key/tailscale.107421.xyz.cert.pem;
|
|
ssl_certificate_key /etc/nginx/conf.d/ssl_key/tailscale.107421.xyz.key.pem;
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
|
ssl_prefer_server_ciphers off;
|
|
|
|
server_name tailscale.107421.xyz;
|
|
|
|
location /derper {
|
|
root /root/app-install/;
|
|
autoindex on; # 开启目录浏览功能;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:8080;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_set_header Host $server_name;
|
|
proxy_redirect http:// https://;
|
|
proxy_buffering off;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
|
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
|
}
|
|
|
|
}
|