From ff0a8be1441f12df5f40a95f0cbb5b40bef0aec4 Mon Sep 17 00:00:00 2001 From: Martin Richtarsky Date: Wed, 12 Jun 2024 09:40:28 +0200 Subject: [PATCH] Add note that proxy_pass needs to be adjusted for domain subpath, otherwise a redirect loop happens --- Using-a-Reverse-Proxy-with-Paperless-ngx.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Using-a-Reverse-Proxy-with-Paperless-ngx.md b/Using-a-Reverse-Proxy-with-Paperless-ngx.md index bc68d5c..b9a2636 100644 --- a/Using-a-Reverse-Proxy-with-Paperless-ngx.md +++ b/Using-a-Reverse-Proxy-with-Paperless-ngx.md @@ -39,6 +39,17 @@ http { The `PAPERLESS_URL` configuration variable is also required when using a reverse proxy; consider setting `USE_X_FORWARD_HOST=true` and `USE_X_FORWARD_PORT=true`. Please refer to the [hosting and security](https://docs.paperless-ngx.com/configuration/#hosting-and-security) docs. +When using a domain subpath (e.g. `/paperless`), you need to set `PAPERLESS_FORCE_SCRIPT_NAME=/paperless` and adjust `proxy_pass` as well: + +``` + ... + location /paperless { + + # Adjust host and port as required. + proxy_pass http://localhost:8000/paperless; + ... +``` + Also read [this](https://channels.readthedocs.io/en/stable/deploying.html#nginx-supervisor-ubuntu), towards the end of the section.