diff options
author | Peter Stadler <peter.stadler@student.uibk.ac.at> | 2020-01-20 22:49:27 +0100 |
---|---|---|
committer | Peter Stadler <peter.stadler@student.uibk.ac.at> | 2020-01-28 12:24:55 +0100 |
commit | 2401fd6db5e582d1b1442e4832222a3fee50937a (patch) | |
tree | 2560f50c4611bc94e0554657db551a07c1b9dde1 /net/nginx/files/nginx.conf | |
parent | c6b4d7f367deafc428c703ce13b0ad0403502fb5 (diff) |
nginx: use /etc/nginx/nginx.conf enabling conf.d/
Instead of the default nginx.conf file this file is a small variant
without examples that enables the /etc/nginx/conf.d/ directory.
It will pull in all configuration files from the conf.d directory.
So, other packages can add their server parts in the conf.d directory
without modifying the main nginx.conf file (cf. #9860).
Changed also the default logging behavior:
error_log stderr; # the init forwards it to logd
access_log off;
See the updated documentation at:
https://openwrt.org/docs/guide-user/services/webserver/nginx
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
Diffstat (limited to 'net/nginx/files/nginx.conf')
-rw-r--r-- | net/nginx/files/nginx.conf | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net/nginx/files/nginx.conf b/net/nginx/files/nginx.conf new file mode 100644 index 000000000..8f8c8b194 --- /dev/null +++ b/net/nginx/files/nginx.conf @@ -0,0 +1,28 @@ +# Please consider creating files in /etc/nginx/conf.d/ instead of editing this. +# For details see https://openwrt.org/docs/guide-user/services/webserver/nginx + +user root; + +events {} + +http { + access_log off; + log_format openwrt + '$request_method $scheme://$host$request_uri => $status' + ' (${body_bytes_sent}B in ${request_time}s) <- $http_referer'; + + include mime.types; + default_type application/octet-stream; + sendfile on; + + client_max_body_size 17M; + large_client_header_buffers 2 1k; + + gzip on; + gzip_vary on; + gzip_proxied any; + + root /www; + + include conf.d/*.conf; +} |