ZM Port Numbers

Forum for questions and support relating to the 1.25.x releases only.
Locked
jplamb13
Posts: 10
Joined: Fri Feb 15, 2013 8:31 pm

ZM Port Numbers

Post by jplamb13 »

Hi All,

I have got ZM setup and it works great on port 80 but i am wanting it on a different port, i have set up apache to listen to port 81 as well , from this i can load the ZM console but when ever i load a live feed it does not work on port 81 but does on port 80.

on port 81 it opens the new window but only shows a image place holder, as though it can not access the feed,

does anybody have any ideas?

many thanks
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: ZM Port Numbers

Post by PacoLM »

Maybe you missed something, this is what I did to use another port in apache (taken from somewhere in this forum):

1- edit /etc/apache2/ports.conf, then change both "NameVirtualHost *:80" and "Listen 80" to the new port
2- edit /etc/apache2/sites-enabled/000-default and change "<VirtualHost *:80>" to reflect the new port
3- restart apache "service apache2 restart"

Hope it helps,

PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
johnaaronrose
Posts: 54
Joined: Tue Feb 27, 2018 9:27 am

Re: ZM Port Numbers

Post by johnaaronrose »

If you want to check that Apache is now listening to port 81, try http://127.0.0.1:81 in your browser and you should get the Apache default page.
John
pat2
Posts: 157
Joined: Fri Sep 16, 2016 6:35 pm

Re: ZM Port Numbers

Post by pat2 »

It could be interesting my experience.
On my server I have Zoneminder and a website.
My need:
1. the website on port 80, then redirected to 443,
2. Zoneminder on a different port: port 81. (i.e.: Zoneminder reached directly on localhost: 81, not on localhost:80/zm)

Solution:

1. comment in sudo nano /etc/apache2/conf-available/zoneminder.conf the line:
#Alias /zm /usr/share/zoneminder/www

2. create a virtual host file:

Listen 81
<VirtualHost *:81>
ServerName mysite
DocumentRoot /usr/share/zoneminder/www
</VirtualHost>

<VirtualHost *:80>
ServerName mysite
DocumentRoot /var/www/html
Redirect permanent / https://www.mysite.com/
</VirtualHost>

then I'm able to expose my website on Internet on 443 (portforwarding 443 port on router) and expose Zoneminder on Internet on a dedicated crypted port, i.e. 2443 (reverse proxy between 81 and a dedicated crypted port and portforwarding of the dedicated crypted port on router):

<VirtualHost *:443>
ServerName mysite
SSLEngine On
...
</VirtualHost>

Listen 2443
<VirtualHost *:2443>
ServerName mysite
SSLEngine On
...
ProxyPreserveHost On
ProxyPass / http://localhost:81/
ProxyPassReverse / http://localhost:81/
</VirtualHost>
---------------------------------------------------------------------------
ZM 1.36.36 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Locked