test.conf 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. server
  2. {
  3. listen 80;
  4. listen 443 ssl;
  5. server_name sandbox-va.fusionpay.one;
  6. index index.html index.htm default.htm default.html;
  7. root /www/wwwroot/va/admin_test/dist;
  8. #SSL-START SSL related configuration
  9. #error_page 404/404.html;
  10. ssl_certificate /www/server/panel/vhost/cert/server/fullchain.pem;
  11. ssl_certificate_key /www/server/panel/vhost/cert/server/privkey.pem;
  12. ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
  13. ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  14. ssl_prefer_server_ciphers on;
  15. ssl_session_cache shared:SSL:10m;
  16. ssl_session_timeout 10m;
  17. add_header Strict-Transport-Security "max-age=31536000";
  18. error_page 497 https://$host$request_uri;
  19. #SSL-END
  20. #ERROR-PAGE-START Error page related configuration
  21. #error_page 404 /404.html;
  22. #error_page 502 /502.html;
  23. #ERROR-PAGE-END
  24. #REWRITE-START Pseudo-static related configuration
  25. include /www/server/panel/vhost/rewrite/node_server.conf;
  26. #REWRITE-END
  27. location / {
  28. index index.html index.htm;
  29. try_files $uri $uri/ @router;
  30. }
  31. location @router {
  32. rewrite ^.*$ /index.html last;
  33. }
  34. #Files or directories forbidden to access
  35. location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md|package.json|package-lock.json|\.env|node_modules) {
  36. return 404;
  37. }
  38. #One-click application for SSL certificate verification directory related settings
  39. location /.well-known/ {
  40. root /www/wwwroot/va/server_test;
  41. }
  42. # HTTP reverse proxy related settings begin >>>
  43. location ~ /purge(/.*) {
  44. proxy_cache_purge cache_one $host$request_uri$is_args$args;
  45. }
  46. location /api/ {
  47. proxy_pass http://127.0.0.1:8009/;
  48. proxy_set_header Host $host;
  49. proxy_set_header X-Real-IP $remote_addr;
  50. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  51. proxy_set_header REMOTE-HOST $remote_addr;
  52. add_header X-Cache $upstream_cache_status;
  53. proxy_connect_timeout 30s;
  54. proxy_read_timeout 86400s;
  55. proxy_send_timeout 30s;
  56. proxy_http_version 1.1;
  57. proxy_set_header Upgrade $http_upgrade;
  58. proxy_set_header Connection "upgrade";
  59. }
  60. location /api-doc/ {
  61. proxy_pass http://127.0.0.1:8009/swagger-ui/index.html;
  62. proxy_set_header Host $host;
  63. proxy_set_header X-Real-IP $remote_addr;
  64. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  65. proxy_set_header REMOTE-HOST $remote_addr;
  66. add_header X-Cache $upstream_cache_status;
  67. proxy_connect_timeout 30s;
  68. proxy_read_timeout 86400s;
  69. proxy_send_timeout 30s;
  70. proxy_http_version 1.1;
  71. proxy_set_header Upgrade $http_upgrade;
  72. proxy_set_header Connection "upgrade";
  73. }
  74. # End of HTTP reverse proxy related settings <<<
  75. access_log /www/wwwlogs/server.log;
  76. error_log /www/wwwlogs/server.error.log;
  77. }