Open aronmgv opened 3 years ago
Thanks for opening your first issue here! Just a reminder, this forum is for Bug Reports only. Be sure to follow the issue template!
I have been having the same problem for quite some time, but to a greater extent.
I have traefik2 set up properly (works with other services) and multiple ZM servers in a multi-server configuration on top of docker swarm. Live streams do not work because of some redirecting that is done to a host that is not accessible from outside the docker network. Likewise, the API access also fails.
I am inclined to believe at this point that unless you are running a single instance of ZM on non-swarm docker, you are unlikely to be successful.
@zombielinux actually this is my scenario. Just single instance on non-swarm docker.
Similar deployment has also the Guacamole project. Where you have apache server hosting the app on the prefix /guacamole
. Here adding just addPrefix: /guacamole
works 100%..
So I tried this as well a while back and it never worked for me, instead I used a redirect to solve this, and it's been fine for me (users going to the parent page are nicely redirected automatically):
traefik.http.routers.zoneminder.middlewares: "zoneminder-redir"
traefik.http.middlewares.zoneminder-redir.redirectregex.regex: "^https:\\/\\/([^\\/]+)\\/?$"
traefik.http.middlewares.zoneminder-redir.redirectregex.replacement: "https://$1/zm/"
@michael-robbins Tried it as well using different pattern and didnt work:
regex: "^https?://cam.example.com/(.*)"
replacement: "https://cam.example.com/zm/"
Yours works for me:
regex: "^https?://([^/]+)/?$"
replacement: "https://$1/zm/"
Mind explaining me this part: ([^/]+)/?
please? Appreciate! Michal
EDIT: I think I get it now.. we strictly just match the FQDN - in other words anything between / sub3.sub2.sub1.dom.com /
and this forcibly has applied /zm/
path segment.. Haven't yet seen such one.. Thanks again.
Not gonna lie, I just copied it off another GitHub comment somewhere lol
But yes it's just another way to match the domain!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello,
I am having quite troubles with configuring reverse proxy for Zoenminder (v1.36.4).
I am using
addPrefix
to add/zm/
in background so user can directly access Zoneminder on its subdomain cam.example.com. This partially works - I am getting the web page, but some styles are missing and stream is not working. After some time I get redirected tocam.example.com/zm/index.php
- which does not exist on subdomain context.. If I tries to loadcam.example.com/index.php
it succeeds.Direct access:
vs
Subdomain access:
For the streams its the same scenario:
Traefik2 configuration for the reverse proxy zoneminder:
Any directions will be appreciated. Thanks, Michal