|
@@ -1,19 +1,23 @@
|
|
|
|
|
+# alien-website 官网(Vue 静态站)
|
|
|
|
|
+# 文件名以 00- 开头,确保在 conf.d 中先于 ailen.shop.h5.conf、frontend.conf 加载,
|
|
|
|
|
+# 同名 server_name 时本配置优先生效,无需修改其他核心 conf。
|
|
|
|
|
+
|
|
|
server {
|
|
server {
|
|
|
listen 80;
|
|
listen 80;
|
|
|
- server_name www.ailien.shop;
|
|
|
|
|
|
|
+ server_name ailien.shop www.ailien.shop;
|
|
|
return 301 https://$host$request_uri;
|
|
return 301 https://$host$request_uri;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
server {
|
|
|
listen 443 ssl;
|
|
listen 443 ssl;
|
|
|
- server_name www.ailien.shop;
|
|
|
|
|
|
|
+ server_name ailien.shop www.ailien.shop;
|
|
|
|
|
|
|
|
ssl_certificate /etc/nginx/ssl/ailien.shop.pem;
|
|
ssl_certificate /etc/nginx/ssl/ailien.shop.pem;
|
|
|
ssl_certificate_key /etc/nginx/ssl/ailien.shop.key;
|
|
ssl_certificate_key /etc/nginx/ssl/ailien.shop.key;
|
|
|
|
|
|
|
|
location / {
|
|
location / {
|
|
|
root /alien_test/nginx/html/alien_website;
|
|
root /alien_test/nginx/html/alien_website;
|
|
|
- index index.html;
|
|
|
|
|
|
|
+ index index.html index.htm;
|
|
|
try_files $uri $uri/ /index.html;
|
|
try_files $uri $uri/ /index.html;
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|