1. The problem I’m having:
Here’s my Caddyfile:
woofcam.live, www.woofcam.live {
rewrite /socket.io /socket.io/
handle_path /socket.io/* {
rewrite * /socket.io{path}
reverse_proxy localhost:4005
}
handle_path /watcher/* {
root * /var/www/project/frontend/watcher
try_files {path} {file} /index.html
file_server browse
}
handle /broadcaster/* {
root * /var/www/project/frontend/broadcast
try_files {path} {file} /index.html
file_server browse
}
}
I can currently access the /broadcaster route but only if I write https://woofcam.live/broadcaster/anything-else
When I try to access https://woofcam.live/broadcaster
without the /anything-else
path, it gives back a status 200 but no body. Just blank, no files either.
What I’d like to do is have this site accessible using https://woofcam.live/broadcaster
with no extra path.
For the “watcher” route, I’d like to be able to handle something like https://woofcam.live/watcher
but also handle https://woofcam.live/watcher/code
where /code
is a UUID that the website will use. The above Caddyfile works with handling the /code
route for the watcher but not without it.
When I rewrite the caddyfile so it’s handle /broadcaster {
without the /*
as before, the html file loads but the styles and .js files don’t load.
3. Caddy version:
V 2.6.2
4. How I installed and ran Caddy:
The standard way for Debian, Ubuntu etc.