00-website.conf 680 B

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