No "zm" in /var/www/html"?

Support and queries relating to third party Live CDs and DVD, VM images and other packaged distributions
Post Reply
Rayj00
Posts: 39
Joined: Mon Jan 09, 2023 3:56 pm

No "zm" in /var/www/html"?

Post by Rayj00 »

My install seemed to go well. I started the zoneminder process. But I see nothing in the apache2 /var/www/html/ ?
Yet the install says to browse to http://hostname_or_ip/zm? What am I missing?

Thanks
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: No "zm" in /var/www/html"?

Post by Magic919 »

Apache virtual host config.
-
Rayj00
Posts: 39
Joined: Mon Jan 09, 2023 3:56 pm

Re: No "zm" in /var/www/html"?

Post by Rayj00 »

I use LXD to create various containers that I create, such as websites or web apps. One container runs haproxy as a reverse proxy. This works fine for me using sub-domains to route to the proper container.

I have installed zoneminder in a LXD container.

root@mycamera:/etc/apache2# apachectl -S
VirtualHost configuration:
*:80 mycamera.lxd (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name="www-data" id=33
Group: name="www-data" id=33

So i guess the question is, is this doable? How would I access this virtual host?
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: No "zm" in /var/www/html"?

Post by Magic919 »

I expect it is possible.
-
Rayj00
Posts: 39
Joined: Mon Jan 09, 2023 3:56 pm

Re: No "zm" in /var/www/html"?

Post by Rayj00 »

When I try to browse to zoneminder, I am getting:
503 Service Unavailable
No server is available to handle this request.

So I have a subdomain that haproxy uses to forward to the correct LXD container which holds the zoneminder install. I actually have multiple sub-domains that I use for haproxy to route to specific LXD containers and they work fine. Just this one for zoneminder is not working?

here is my haproxy.cfg for zoneminder:

front_end http_1b
bind *:80
bind *:443 ssl crt /etc/haproxy/certs/
http-request redirect scheme https unless { ssl_fc }
acl cameras hdr(host) -i mycamera.streamingworld.us
use_backend camera if cameras

backend camera
balance leastconn
http-request set-header X-Client-IP %[src]
redirect scheme https if ! { ssl_fc }
server zmcamera mycamera.lxd check ssl verify none

Note that I use the above formats for a bunch of other sub-domain LXD containers and they work fine.

Thanks.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: No "zm" in /var/www/html"?

Post by Magic919 »

I don't really want to get involved with all that madness, but I'll repeat that you need to use the virtual host for zoneminder.
-
Rayj00
Posts: 39
Joined: Mon Jan 09, 2023 3:56 pm

Re: No "zm" in /var/www/html"?

Post by Rayj00 »

Madness to some makes sense to others.

I am looking for someone who can advise on using Zoneminder behind a reverse proxy. How to incorporate the Virtual Server?

Also i am not expert on Apache2 and Virtual servers.....
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: No "zm" in /var/www/html"?

Post by Magic919 »

Ok.

Good luck.
-
Rayj00
Posts: 39
Joined: Mon Jan 09, 2023 3:56 pm

Re: No "zm" in /var/www/html"?

Post by Rayj00 »

So why doesn't Zoneminder install where it makes sense.../var/www/html/ ????
Post Reply