nginx.conf 757 B

1234567891011121314151617181920212223242526272829303132333435
  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 8081;
  12. server_name localhost;
  13. location / {
  14. root /usr/share/nginx/html/web;
  15. index index.html index.htm;
  16. try_files $uri $uri/ /index.html;
  17. }
  18. location /api/{
  19. proxy_pass http://ruoyi-server:6039/;
  20. # 避免出现反代https域名出现502错误
  21. proxy_ssl_server_name on;
  22. }
  23. error_page 500 502 503 504 /50x.html;
  24. location = /50x.html {
  25. root /usr/share/nginx/html;
  26. }
  27. }
  28. }