From 9aebb496a34a1dd7b5348404a786b02eb4257123 Mon Sep 17 00:00:00 2001 From: onyx-flame Date: Fri, 23 Jun 2023 22:51:15 +0300 Subject: [PATCH] enriched reverse proxy docs block with custom configuration --- docs/reverse-proxy.rst | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/reverse-proxy.rst b/docs/reverse-proxy.rst index 6d7ee86a2..1542891de 100644 --- a/docs/reverse-proxy.rst +++ b/docs/reverse-proxy.rst @@ -5,22 +5,34 @@ Running behind reverse proxy To run `Flower` behind a reverse proxy, remember to set the correct `Host` header to the request to make sure Flower can generate correct URLs. -The following is a minimal `nginx` configuration: + +The following block represents the minimal `nginx` configuration: .. code-block:: nginx server { listen 80; server_name flower.example.com; - charset utf-8; location / { proxy_pass http://localhost:5555; - proxy_set_header Host $host; - proxy_redirect off; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + } + } + +If you run Flower behind custom location, make sure :ref:`url_prefix` option +value equals to the location path. + +For instance, for `url_prefix` = **flower** (or **/flower**) you need the following +`nginx` configuration: + +.. code-block:: nginx + + server { + listen 80; + server_name flower.example.com; + + location /flower/ { + proxy_pass http://localhost:5555; } }