From dc121ce2b28708750766b623693268a92d82923b Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 31 Jan 2025 12:41:08 +0300 Subject: [PATCH] README.md: add example for hosting behind nginx Hosting on a subpath behind nginx. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 850447e..f6753e0 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,21 @@ Create a Python 3.10+ virtual environment and install the dependencies: And then visit http://localhost:8000/ in your browser. +## Running Behind nginx + +Set the `SCRIPT_NAME` environment variable to the path you will reverse proxy from: + + $ gunicorn csv_metadata_quality_web.main --env SCRIPT_NAME=/csv-metadata-quality + +Then use a configuration snippet like this in nginx: + +``` + location /csv-metadata-quality { + include proxy_params; + proxy_pass http://127.0.0.1:8000; + } +``` + ## License This work is licensed under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html).