Files
Work-configuration-file/nginx/www.flytothemoon.net.conf
2025-10-07 15:58:15 +08:00

42 lines
1.2 KiB
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.

# 1. 强制 HTTP 转 HTTPS统一跳转到 www.flytothemoon.net
server {
listen 80;
server_name flytothemoon.net www.flytothemoon.net;
return 301 https://www.flytothemoon.net$request_uri;
}
# 2. 统一将 flytothemoon.net 重定向到 www.flytothemoon.netHTTPS 保留)
server {
listen 443 ssl;
server_name flytothemoon.net;
ssl_certificate /data/tengine/conf/certificate/flytothemoon.net_bundle.crt;
ssl_certificate_key /data/tengine/conf/certificate/flytothemoon.net.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
return 301 https://www.flytothemoon.net$request_uri;
}
# 3. 正式服务站点https://www.flytothemoon.net
server {
listen 443 ssl;
server_name www.flytothemoon.net;
ssl_certificate /data/tengine/conf/certificate/flytothemoon.net_bundle.crt;
ssl_certificate_key /data/tengine/conf/certificate/flytothemoon.net.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
root /data/tengine/html/www.flytothemoon.net/html/;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}