server {
listen 80;
server_name panel.666666.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name panel.666666.com;
ssl_certificate /root/.acme.sh/panel.666666.com_ecc/panel.666666.com.cer;
ssl_certificate_key /root/.acme.sh/panel.666666.com_ecc/panel.666666.com.key;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m;
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;
ssl_protocols TLSv1.1 TLSv1.2;
add_header Strict-Transport-Security "max-age=63072000" always;
client_max_body_size 500m; # 文件上传大小限制
location / {
proxy_pass http://127.0.0.1:81; # 1Panel 默认端口
proxy_http_version 1.1;
proxy_buffering off;
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
}
版权归属:
JW
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区