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 1.5 kB

1 year ago
1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. server {
  11. listen 8000;
  12. server_name localhost;
  13. location /api/{
  14. rewrite ^/prod-api/(.*)$ /$1 break;
  15. proxy_set_header Host $http_host;
  16. proxy_set_header X-Real-IP $remote_addr;
  17. proxy_set_header REMOTE-HOST $remote_addr;
  18. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  19. proxy_pass http://ci4s-gateway-service.argo.svc:8082/;
  20. }
  21. location /label-studio {
  22. rewrite ^/prod-api/(.*)$ /$1 break;
  23. proxy_pass http://label-studio-ls-app.label-data.svc:80/;
  24. proxy_hide_header X-Frame-Options;
  25. add_header X-Frame-Options "ALLOW-FROM http://label-studio-ls-app.label-data.svc:80/";
  26. }
  27. location / {
  28. rewrite ^/prod-api/(.*)$ /$1 break;
  29. root /home/ruoyi/projects/ruoyi-ui;
  30. try_files $uri $uri/ /index.html;
  31. index index.html index.htm;
  32. }
  33. location @router {
  34. rewrite ^.*$ /index.html last;
  35. }
  36. # 避免actuator暴露
  37. if ($request_uri ~ "/actuator") {
  38. return 403;
  39. }
  40. error_page 500 502 503 504 /50x.html;
  41. location = /50x.html {
  42. root html;
  43. }
  44. }
  45. }