Skip to content

Commit

Permalink
enriched reverse proxy docs block with custom configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
onyx-flame committed Jun 23, 2023
1 parent 088ac9a commit 9aebb49
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions docs/reverse-proxy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 9aebb49

Please sign in to comment.