nginx.conf 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. # gzip config
  5. gzip on;
  6. gzip_min_length 1k;
  7. gzip_comp_level 9;
  8. gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
  9. gzip_vary on;
  10. gzip_disable "MSIE [1-6]\.";
  11. resolver $NAMESERVERS ipv6=off;
  12. root /usr/share/nginx/html;
  13. include /etc/nginx/mime.types;
  14. location / {
  15. index index.html;
  16. }
  17. location ^~/jetlinks/ {
  18. if ($request_uri ~* ^/jetlinks/(.*)$) {
  19. proxy_pass http://host.docker.internal:8840/$1;
  20. }
  21. #proxy_pass http://host.docker.internal:8840/;
  22. proxy_set_header X-Forwarded-Proto $scheme;
  23. proxy_set_header Host $host:$server_port;
  24. proxy_set_header X-Real-IP $remote_addr;
  25. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  26. proxy_http_version 1.1;
  27. proxy_set_header Upgrade $http_upgrade;
  28. proxy_set_header Connection "upgrade";
  29. proxy_connect_timeout 1;
  30. proxy_buffering off;
  31. chunked_transfer_encoding off;
  32. proxy_cache off;
  33. proxy_send_timeout 30m;
  34. proxy_read_timeout 30m;
  35. client_max_body_size 500m;
  36. }
  37. }