You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

nginx.conf.20240705 2.0 kB

1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. client_max_body_size 20480m;
  11. server {
  12. listen 8000;
  13. server_name localhost;
  14. location /api/{
  15. # rewrite ^/prod-api/(.*)$ /$1 break;
  16. proxy_set_header Host $http_host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header REMOTE-HOST $remote_addr;
  19. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  20. proxy_pass http://ci4s-gateway-service.argo.svc:8082/;
  21. proxy_connect_timeout 500s; # 设置连接超时时间为 120 秒
  22. proxy_read_timeout 500s; # 设置读取超时时间为 120 秒
  23. proxy_send_timeout 500s; # 设置发送超时时间为 120 秒
  24. }
  25. location /label-studio/ {
  26. # rewrite ^/label-studio/(.*)$ /$1 break;
  27. proxy_pass http://label-studio-service.argo.svc:8080/projects/;
  28. proxy_hide_header X-Frame-Options;
  29. add_header X-Frame-Options ALLOWALL;
  30. }
  31. location / {
  32. rewrite ^/prod-api/(.*)$ /$1 break;
  33. root /home/ruoyi/projects/ruoyi-ui;
  34. try_files $uri $uri/ /index.html;
  35. index index.html index.htm;
  36. }
  37. location /api/v1/model/ {
  38. proxy_pass http://pipeline-convert-service.argo.svc:80;
  39. proxy_set_header REMOTE-HOST $remote_addr;
  40. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  41. }
  42. location @router {
  43. rewrite ^.*$ /index.html last;
  44. }
  45. # 避免actuator暴露
  46. if ($request_uri ~ "/actuator") {
  47. return 403;
  48. }
  49. error_page 500 502 503 504 /50x.html;
  50. location = /50x.html {
  51. root html;
  52. }
  53. }
  54. }