default.conf 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name localhost;
  5. #charset koi8-r;
  6. #access_log /var/log/nginx/host.access.log main;
  7. location / {
  8. root /usr/share/nginx/html;
  9. index index.html index.htm;
  10. try_files $uri $uri/ /index.html;
  11. }
  12. location /api {
  13. proxy_pass http://go-admin:8000/api;
  14. proxy_http_version 1.1;
  15. proxy_set_header Connection “”;
  16. proxy_connect_timeout 300s;
  17. proxy_send_timeout 900;
  18. proxy_read_timeout 900;
  19. proxy_buffer_size 32k;
  20. proxy_buffers 4 64k;
  21. proxy_busy_buffers_size 128k;
  22. proxy_redirect off;
  23. proxy_hide_header Vary;
  24. proxy_set_header Accept-Encoding '';
  25. proxy_set_header Referer $http_referer;
  26. proxy_set_header Cookie $http_cookie;
  27. proxy_set_header Host $host;
  28. proxy_set_header X-Real-IP $remote_addr;
  29. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30. proxy_set_header X-Forwarded-Proto $scheme;
  31. }
  32. location /login {
  33. proxy_pass http://go-admin:8000/login;
  34. proxy_http_version 1.1;
  35. proxy_set_header Connection “”;
  36. proxy_connect_timeout 300s;
  37. proxy_send_timeout 900;
  38. proxy_read_timeout 900;
  39. proxy_buffer_size 32k;
  40. proxy_buffers 4 64k;
  41. proxy_busy_buffers_size 128k;
  42. proxy_redirect off;
  43. proxy_hide_header Vary;
  44. proxy_set_header Accept-Encoding '';
  45. proxy_set_header Referer $http_referer;
  46. proxy_set_header Cookie $http_cookie;
  47. proxy_set_header Host $host;
  48. proxy_set_header X-Real-IP $remote_addr;
  49. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  50. proxy_set_header X-Forwarded-Proto $scheme;
  51. }
  52. }