test-hairstylist.aitori.jp.conf 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # 将HTTP请求重定向到HTTPS
  2. server {
  3. listen 80;
  4. server_name test-hairstylist.aitori.jp;
  5. return 301 https://$server_name$request_uri;
  6. }
  7. # 配置HTTPS
  8. server {
  9. listen 443 ssl;
  10. server_name test-hairstylist.aitori.jp;
  11. # SSL证书和密钥文件
  12. ssl_certificate cert/test-hairstylist.aitori.jp.pem;
  13. ssl_certificate_key cert/test-hairstylist.aitori.jp.key;
  14. # SSL配置
  15. ssl_session_timeout 5m;
  16. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!aNULL:!MD5:!ADH:!RC4;
  17. ssl_protocols TLSv1.2 TLSv1.3;
  18. ssl_prefer_server_ciphers on;
  19. root /data/www/bi/html;
  20. index index.html;
  21. # location 配置
  22. location ^~ /api/ {
  23. proxy_pass http://127.0.0.1:3000;
  24. proxy_set_header Host $host;
  25. proxy_set_header X-Real-IP $remote_addr;
  26. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  27. proxy_set_header X-Forwarded-Proto $scheme;
  28. }
  29. location / {
  30. try_files $uri $uri/ /index.html;
  31. }
  32. # 错误页面配置
  33. error_page 404 /404.html;
  34. location = /40x.html { }
  35. error_page 500 502 503 504 /50x.html;
  36. location = /50x.html { }
  37. }