Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

54 строки
1.4 KiB

  1. server {
  2. listen 80;
  3. server_name _;
  4. root /usr/share/nginx/html;
  5. index index.html;
  6. client_max_body_size 105m;
  7. gzip on;
  8. gzip_types text/plain text/css application/json application/javascript text/xml image/svg+xml;
  9. gzip_min_length 1024;
  10. location = /index.html {
  11. add_header Cache-Control "no-store";
  12. }
  13. location /api/ {
  14. proxy_pass http://emp-gateway:9000/api/;
  15. proxy_http_version 1.1;
  16. proxy_set_header Host $host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  19. proxy_set_header X-Forwarded-Proto $scheme;
  20. proxy_read_timeout 300s;
  21. }
  22. location /socket.io/ {
  23. proxy_pass http://emp-ws:3000/socket.io/;
  24. proxy_http_version 1.1;
  25. proxy_set_header Upgrade $http_upgrade;
  26. proxy_set_header Connection "upgrade";
  27. proxy_set_header Host $host;
  28. proxy_read_timeout 300s;
  29. }
  30. location / {
  31. add_header Cache-Control "no-store";
  32. try_files $uri $uri/ /index.html;
  33. }
  34. location ~* \.(js|css)$ {
  35. expires -1;
  36. add_header Cache-Control "no-cache, no-store, must-revalidate";
  37. try_files $uri =404;
  38. }
  39. location ~* \.(png|jpg|jpeg|gif|ico|svg|woff2?|ttf|glb)$ {
  40. expires 30d;
  41. add_header Cache-Control "public, immutable";
  42. try_files $uri =404;
  43. }
  44. }