knowledge-vault/sources/references/开发笔记/AI_Server/models.wantsong.life.conf

27 lines
874 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server {
listen 80;
server_name models.wantsong.life; # 域名
rewrite ^/(.*) https://$server_name$request_uri? permanent; # 将HTTP请求重定向到HTTPS
}
server {
listen 443 ssl;
server_name models.wantsong.life; # 同上确保与上面的server_name一致
charset utf-8;
ssl_certificate /etc/nginx/ssl/_.wantsong.life.pem;
ssl_certificate_key /etc/nginx/ssl/_.wantsong.life.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:1m;
ssl_ciphers AWSGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
root /data/models-wantsong-life; # 指向您的网站根目录
index index.html index.htm; # 指定默认索引文件
location / {
try_files $uri $uri/ =404; # 如果找不到文件则返回404
}
}