diff options
Diffstat (limited to 'user/nginx/nginx.conf')
-rw-r--r-- | user/nginx/nginx.conf | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/user/nginx/nginx.conf b/user/nginx/nginx.conf new file mode 100644 index 000000000..93060f64a --- /dev/null +++ b/user/nginx/nginx.conf @@ -0,0 +1,41 @@ +# This is an example configuration for nginx, with many secure defaults +# already specified. + +# The system user under which nginx should run. +user nginx; + +# The number of worker processes nginx should have; typically this +# should be the number of available cores. 'auto' allows nginx to +# auto-detect a reasonable value. +worker_processes auto; + +# The following is specific to the servicing of HTTP connections. +http { + # Default mapping of MIME types to file extensions. + include mime.types; + # The MIME type to use for unknown extensions. + default_type application/octet-stream; + + # Tuning options + sendfile on; + tcp_nopush on; + aio on; + # The threshold after which direct I/O should be used; insufficient + # documentation exists to provide sensible values, so this will, of + # necessity, require extensive testing with expected workloads to + # get an optimal threshold. + directio 4m; + # The length of time to keep connections open. As with directio, + # this setting will require testing to come at an optimal value. + keepalive_timeout 5s; + # This setting compresses most transmissions when enabled, reducing + # bandwidth usage. + gzip on; + + # Further global configurations + include conf.d/*.conf; + + # Site-specific configurations + include sites.d/*.conf; +} + |