pigx-ui.conf 779 B

123456789101112131415161718192021222324252627
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. gzip on;
  5. gzip_static on; # 需要http_gzip_static_module 模块
  6. gzip_min_length 1k;
  7. gzip_comp_level 4;
  8. gzip_proxied any;
  9. gzip_types text/plain text/xml text/css;
  10. gzip_vary on;
  11. gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  12. # 前端打包好的dist目录文件
  13. root /data/;
  14. # 若新增后端路由前缀注意在此处添加(|新增)
  15. location ~* ^/(code|admin|gen) {
  16. proxy_pass http://pigx-gateway:9999;
  17. proxy_connect_timeout 15s;
  18. proxy_send_timeout 15s;
  19. proxy_read_timeout 15s;
  20. proxy_set_header X-Real-IP $remote_addr;
  21. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  22. proxy_set_header X-Forwarded-Proto http;
  23. }
  24. }