Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Reverse proxy article: nginx config fix #1416

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions docs/reverse-proxy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,25 @@ The following block represents the minimal `nginx` configuration:
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:
You have to use either environment variable `FLOWER_URL_PREFIX=flower`
or command parameter `--url_prefix=flower` when you run it
via `celery`. With that being set you need the following `nginx` configuration:

.. code-block:: nginx

server {
listen 80;
server_name flower.example.com;
server_name example.com;

location /flower/ {
proxy_pass http://localhost:5555;
proxy_pass http://localhost:5555/flower/;
}
}

without `url_prefix` Flower frontend won't be able to generate
correct static links, and without `/flower/` at the end of `proxy_pass`
parameter, the browser will lead you to 404.

Note that you should not expose this site to the public internet without
any sort of authentication! If you have a `htpasswd` file with user
credentials you can make `nginx` use this file by adding the following
Expand Down