From b13ff34569913262fb5ab3884baa4562ee8dbef3 Mon Sep 17 00:00:00 2001 From: bunkerity Date: Fri, 20 Aug 2021 14:59:16 +0200 Subject: [PATCH] add REDIRECT_TO_REQUEST_URI variable and edit environment variables docs --- confs/site/redirect-to.conf | 4 +++ docs/environment_variables.md | 62 +++++++++++++++++++++++++++++++---- docs/security_tuning.md | 2 ++ misc/set2doc.py | 20 +++++++++++ misc/variables.env | 22 ++++++++----- settings.json | 13 ++++++-- tests/linux-run.sh | 10 +++++- 7 files changed, 116 insertions(+), 17 deletions(-) create mode 100755 misc/set2doc.py diff --git a/confs/site/redirect-to.conf b/confs/site/redirect-to.conf index 75b76c2..92aa9ae 100644 --- a/confs/site/redirect-to.conf +++ b/confs/site/redirect-to.conf @@ -1 +1,5 @@ +{% if REDIRECT_TO_REQUEST_URI == "yes" %} return 301 {{ REDIRECT_TO }}$request_uri; +{% else %} +return 301 {{ REDIRECT_TO }}; +{% endif %} diff --git a/docs/environment_variables.md b/docs/environment_variables.md index d4069b0..2597eb3 100644 --- a/docs/environment_variables.md +++ b/docs/environment_variables.md @@ -87,24 +87,42 @@ Default value : *8443* Context : *global* The HTTPS port number used by nginx inside the container. -`WORKER_CONNECTIONS` +`WORKER_CONNECTIONS` Values : *\* Default value : 1024 Context : *global* Sets the value of the [worker_connections](https://nginx.org/en/docs/ngx_core_module.html#worker_connections) directive. -`WORKER_RLIMIT_NOFILE` +`WORKER_RLIMIT_NOFILE` Values : *\* Default value : 2048 Context : *global* Sets the value of the [worker_rlimit_nofile](https://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_nofile) directive. +`WORKER_PROCESSES` +Values : *\* +Default value : auto +Context : *global* +Sets the value of the [worker_processes](https://nginx.org/en/docs/ngx_core_module.html#worker_processes) directive. + `INJECT_BODY` -Values : *\* +Values : *\* Default value : Context : *global*, *multisite* Use this variable to inject any HTML code you want before the \ tag (e.g. : `\