nginx.conf 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #user nobody;
  2. worker_processes auto;
  3. events {
  4. worker_connections 1024;
  5. }
  6. http {
  7. include mime.types;
  8. default_type application/octet-stream;
  9. sendfile on;
  10. #tcp_nopush on;
  11. #keepalive_timeout 0;
  12. keepalive_timeout 65;
  13. gzip on;
  14. server {
  15. listen 80;
  16. server_name localhost;
  17. charset utf-8;
  18. location / {
  19. root html;
  20. try_files $uri $uri/ @router;
  21. index index.html index.htm;
  22. }
  23. location @router {
  24. rewrite ^.*$ /index.html break;
  25. }
  26. location /backend/{
  27. proxy_set_header Host $http_host;
  28. proxy_set_header X-Real-IP $remote_addr;
  29. proxy_set_header REMOTE-HOST $remote_addr;
  30. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  31. client_max_body_size 20M;
  32. proxy_send_timeout 500;
  33. proxy_read_timeout 480;
  34. proxy_pass http://localhost:8992;
  35. }
  36. error_page 500 502 503 504 /50x.html;
  37. location = /50x.html {
  38. root html;
  39. }
  40. }
  41. }