Reputation: 23
I'm trying to configure Caddy as a reverse proxy for Flower, but I'm encountering an issue with the URL format. My desired Flower URL is https://dev.api.domain.com/flower/, but the current URL format is https://dev.api.domain.com/flower/flower/. How can I adjust my Caddy configuration to achieve the desired URL format?
This is my Supervisor configuration for Flower:
[program:project_flower]
command=/home/ubuntu/backend/project/venv/bin/celery -A project flower --url_prefix=/flower
directory=/home/ubuntu/backend/project/project
user=ubuntu
autostart=true
autorestart=true
redirect_stderr=true
stderr_logfile=/var/log/supervisor/project/flower_error.log
stdout_logfile=/var/log/supervisor/project/flower_out.log
And this is my Caddyfile:
{
email [email protected]
}
dev.api.domain.com {
encode zstd gzip
handle_path /static/* {
file_server {
root "/home/ubuntu/backend/project/project/static"
}
}
handle_path /media/* {
file_server {
root "/home/ubuntu/backend/project/project/media"
}
}
handle {
reverse_proxy unix//home/ubuntu/backend/project/project/app.sock
}
handle_path /flower/* {
reverse_proxy localhost:5555
}
}
I believe the issue lies in my Caddy configuration, specifically in how I'm handling the /flower/* path. How can I adjust my Caddyfile to achieve the desired Flower URL format?
Upvotes: 0
Views: 123