dist.conf 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. upstream upstream-sl-gateway-support {
  2. server test_sl-gateway-support:22222 weight=1;
  3. }
  4. server {
  5. listen 80;
  6. server_name _;
  7. root /usr/share/nginx/html/;
  8. index index.html;
  9. location / {
  10. try_files $uri $uri/ @router;
  11. index index.html;
  12. }
  13. location @router {
  14. rewrite ^.*$ /index.html last;
  15. }
  16. location /gateway {
  17. proxy_pass http://upstream-sl-gateway-support/gateway;
  18. proxy_redirect off;
  19. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  20. proxy_set_header X-Real-IP $remote_addr;
  21. proxy_set_header Host $http_host;
  22. proxy_connect_timeout 30;
  23. proxy_send_timeout 180;
  24. proxy_read_timeout 180;
  25. proxy_buffering off;
  26. client_max_body_size 100m;
  27. }
  28. error_page 404 /404.html;
  29. location = /40x.html {
  30. }
  31. error_page 500 502 503 504 /50x.html;
  32. location = /50x.html {
  33. }
  34. }