okki-oms.conf 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. server
  2. {
  3. listen 80;
  4. server_name oms.adwebcloud.com;
  5. index index.html index.htm default.htm default.html;
  6. root /home/centos/okki-oms/jeecgboot-vue3/dist;
  7. #SSL-START SSL相关配置
  8. #error_page 404/404.html;
  9. #SSL-END
  10. #ERROR-PAGE-START 错误页相关配置
  11. #error_page 404 /404.html;
  12. #error_page 502 /502.html;
  13. #ERROR-PAGE-END
  14. #REWRITE-START 伪静态相关配置
  15. #include /www/server/panel/vhost/rewrite/java_JavaWeb_AntdVue_jar.conf;
  16. # 请将伪静态规则或自定义NGINX配置填写到此处
  17. location / {
  18. try_files $uri $uri/ /index.html;
  19. }
  20. #REWRITE-END
  21. #禁止访问的文件或目录
  22. location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md|package.json|package-lock.json|\.env) {
  23. return 404;
  24. }
  25. #一键申请SSL证书验证目录相关设置
  26. location /.well-known/ {
  27. root /www/wwwroot/java_node_ssl;
  28. }
  29. #禁止在证书验证目录放入敏感文件
  30. if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {
  31. return 403;
  32. }
  33. # HTTP反向代理相关配置开始 >>>
  34. #location ~ /purge(/.*) {
  35. # proxy_cache_purge cache_one $Host$request_uri$is_args$args;
  36. #}
  37. location ~ /shop-api/ {
  38. proxy_pass http://oms.adwebcloud.com:8088;
  39. }
  40. location http://oms.adwebcloud.com:8088 {
  41. proxy_pass http://oms.adwebcloud.com;
  42. proxy_set_header Host $Host:$server_port;
  43. proxy_set_header X-Real-IP $remote_addr;
  44. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  45. proxy_set_header REMOTE-HOST $remote_addr;
  46. add_header X-Cache $upstream_cache_status;
  47. proxy_set_header X-Host $host:$server_port;
  48. proxy_set_header X-Scheme $scheme;
  49. proxy_connect_timeout 30s;
  50. proxy_read_timeout 86400s;
  51. proxy_send_timeout 30s;
  52. proxy_http_version 1.1;
  53. proxy_set_header Upgrade $http_upgrade;
  54. proxy_set_header Connection "upgrade";
  55. }
  56. # HTTP反向代理相关配置结束 <<<
  57. #access_log /www/wwwlogs/JavaWeb_AntdVue_jar.log;
  58. #error_log /www/wwwlogs/JavaWeb_AntdVue_jar.error.log;
  59. }