nginx.conf 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. user www-data;
  2. worker_processes {{ .Env.NGINX_WORKER_PROCESSES | default "4" }};
  3. pid /run/nginx.pid;
  4. include /etc/nginx/modules-enabled/*.conf;
  5. events {
  6. worker_connections {{ .Env.NGINX_WORKER_CONNECTIONS | default "768" }};
  7. # multi_accept on;
  8. }
  9. http {
  10. ##
  11. # Basic Settings
  12. ##
  13. sendfile on;
  14. tcp_nopush on;
  15. tcp_nodelay on;
  16. keepalive_timeout {{ .Env.NGINX_KEEPALIVE_TIMEOUT | default "65" }};
  17. types_hash_max_size 2048;
  18. server_tokens off;
  19. # server_names_hash_bucket_size 64;
  20. # server_name_in_redirect off;
  21. client_max_body_size 0;
  22. {{ if .Env.NGINX_RESOLVER }}
  23. resolver {{ .Env.NGINX_RESOLVER }};
  24. {{ end -}}
  25. include /etc/nginx/mime.types;
  26. types {
  27. # add support for the wav MIME type that is requried to playback wav files in Firefox.
  28. audio/wav wav;
  29. }
  30. default_type application/octet-stream;
  31. ##
  32. # Logging Settings
  33. ##
  34. access_log /dev/stdout;
  35. error_log /dev/stderr;
  36. ##
  37. # Gzip Settings
  38. ##
  39. gzip on;
  40. gzip_types text/plain text/css application/javascript application/json;
  41. gzip_vary on;
  42. gzip_min_length 860;
  43. ##
  44. # Connection header for WebSocket reverse proxy
  45. ##
  46. map $http_upgrade $connection_upgrade {
  47. default upgrade;
  48. '' close;
  49. }
  50. ##
  51. # Virtual Host Configs
  52. ##
  53. include /config/nginx/site-confs/*;
  54. }
  55. daemon off;