nginx.conf 827 B

123456789101112131415161718192021222324252627282930313233343536
  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://ruoyi-gateway:8080/;
  24. }
  25. error_page 500 502 503 504 /50x.html;
  26. location = /50x.html {
  27. root html;
  28. }
  29. }
  30. }# requirepass 123456