Nginx 网站配置
server {
#SSL 默认访问端口号为 443
listen 443 ssl;
#请填写绑定证书的域名
server_name alist.hapgpt.com;
#请填写证书文件的相对路径或绝对路径
ssl_certificate /etc/nginx/ssl/hapgpt.com_bundle.crt;
ssl_certificate_key /etc/nginx/ssl/hapgpt.com.key;
ssl_session_timeout 5m;
#请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
#请按照以下协议配置
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
# 设置超时时间,单位为秒
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_redirect off;
proxy_pass http://127.0.0.1:0000;
# the max size of file to upload
client_max_body_size 20000m;
}
}
server {
listen 80;
listen [::]:80;
#请填写绑定证书的域名
server_name alist.hapgpt.com;
#把http的域名请求转成https
return 301 https://$host$request_uri;
}
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 小莫分享·资源搜集
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果