nginx.conf 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 80;
  12. server_name localhost;
  13. location / {
  14. root /home/ruoyi/projects/ruoyi-ui;
  15. try_files $uri $uri/ /index.html;
  16. index index.html index.htm;
  17. }
  18. location /prod-api/{
  19. proxy_set_header Host $http_host;
  20. proxy_set_header X-Real-IP $remote_addr;
  21. proxy_set_header REMOTE-HOST $remote_addr;
  22. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  23. proxy_pass http://usky-cloud-gateway:9150/;
  24. }
  25. location /dev-api/{
  26. proxy_set_header Host $http_host;
  27. proxy_set_header X-Real-IP $remote_addr;
  28. proxy_set_header REMOTE-HOST $remote_addr;
  29. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30. proxy_pass http://usky-cloud-gateway:9150/;
  31. }
  32. error_page 500 502 503 504 /50x.html;
  33. location = /50x.html {
  34. root html;
  35. }
  36. }
  37. }