static_service.conf.j2 677 B

123456789101112131415161718192021222324252627282930313233
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. listen 443 ssl http2;
  5. server_name {{item.server_name}};
  6. keepalive_timeout 200;
  7. {{item.custom_config | default('') | indent(2)}}
  8. {% if with_ssl %}
  9. ssl_session_timeout 5m;
  10. ssl_session_cache shared:SSL:50m;
  11. ssl_session_tickets off;
  12. ssl_certificate /etc/nginx/certs/ada/ada.crt;
  13. ssl_certificate_key /etc/nginx/certs/ada/ada.key;
  14. {% endif %}
  15. root {{ item.server_root }};
  16. location / {
  17. # compression
  18. gzip on;
  19. gzip_types text/plain application/xml application/json;
  20. gzip_proxied no-cache no-store private expired auth;
  21. gzip_min_length 1000;
  22. # cache
  23. proxy_cache STATIC;
  24. }
  25. }