In development mode(local), it is really easy to access flower page (http://localhost:5555)
But in production mode, it is difficult to access flower page.
I'd like to access flower dashboard page with this url:
https://spacegraphy.choislaw.xyz/flower/ (Domain name : choislaw.xyz)
I refered http://flower.readthedocs.io/en/latest/reverse-proxy.html#reverse-proxy and this is what I did:
nginx.conf
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
server {
listen 80;
server_name spacegraphy.choislaw.xyz;
client_max_body_size 4G;
keepalive_timeout 5;
return 301 https://$server_name$request_uri;
}
# HTTPS server
server {
listen 443 default_server ssl;
server_name spacegraphy.choislaw.xyz;
client_max_body_size 4G;
keepalive_timeout 5;
ssl_certificate /etc/letsencrypt/live/spacegraphy.choislaw.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/spacegraphy.choislaw.xyz/privkey.pem;
location / {
proxy_pass_header X-CSRFToken;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:4349;
proxy_redirect off;
}
# Flower
location /flower/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_pass http://localhost:5555/;
proxy_redirect off;
}
}
}
And I execute flower server:
$ celery --workdir=spacegraphy/ --app=spacegraphy.celery:app flower
And I access https://spacegraphy.choislaw.xyz/flower/, it shows like this:
And If I click any link,
Did I miss something? Do I separate flower server from application server?
Btw, Is it usual to run flower server on production server?
/path/to/flower/static
? – Airlee