nginxSandbox.conf 4.4 KB

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