From 73f9639a00e2ac98533e9a26ad2e2746e7a42077 Mon Sep 17 00:00:00 2001 From: bfren Date: Tue, 28 Nov 2023 18:56:43 +0000 Subject: [PATCH] Adding custom configuration support --- overlay/etc/bf/templates/localhost.conf.esh | 29 +++++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/overlay/etc/bf/templates/localhost.conf.esh b/overlay/etc/bf/templates/localhost.conf.esh index dab75cb..78ef7eb 100644 --- a/overlay/etc/bf/templates/localhost.conf.esh +++ b/overlay/etc/bf/templates/localhost.conf.esh @@ -1,21 +1,40 @@ server { + # listen to port 80 - this is designed to be a local-only image, behind a proxy server + # https://nginx.org/en/docs/http/ngx_http_core_module.html#listen listen 80; listen [::]:80; + # files root + # https://nginx.org/en/docs/http/ngx_http_core_module.html#root root <% bf-env NGINX_WWW %>; + # allow index page for accessing files via a browser + # https://nginx.org/en/docs/http/ngx_http_autoindex_module.html#autoindex autoindex on; + # define temporary file hierarchy + # https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_temp_path + client_body_temp_path /tmp 1 2; + + + # enable WebDAV extensions + # https://nginx.org/en/docs/http/ngx_http_dav_module.html#dav_access + # https://nginx.org/en/docs/http/ngx_http_dav_module.html#dav_methods dav_access all:<% bf-env NGINX_WEBDAV_ACCESS %>; dav_methods <% bf-env NGINX_WEBDAV_METHODS %>; dav_ext_methods <% bf-env NGINX_WEBDAV_EXT_METHODS %>; - client_body_temp_path /tmp; - + # create intermediate directories when PUTting a new file + # https://nginx.org/en/docs/http/ngx_http_dav_module.html#create_full_put_path create_full_put_path on; - proxy_max_temp_file_size 0; + # remove upload limits + # https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering + # https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_max_temp_file_size proxy_buffering off; - + proxy_max_temp_file_size 0; include helpers/uploads.conf; -} \ No newline at end of file + + # include custom configuration file + include sites/localhost-custom[.].conf; +}