Page 1 of 1

ZM Port Numbers

Posted: Tue Dec 10, 2013 9:52 pm
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

Re: ZM Port Numbers

Posted: Wed Dec 11, 2013 8:23 am
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

Re: ZM Port Numbers

Posted: Fri Mar 02, 2018 1:21 pm
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.

Re: ZM Port Numbers

Posted: Sun Dec 27, 2020 5:44 pm
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>