Page 1 of 1

Changing the port from 80

Posted: Thu Jun 27, 2019 7:28 pm
by Figge71
Hi!

First I want to apologize, I’m a newbie that have tried to find out how to make the change for a week.



I would like change the port from 80, and can’t find out how to do it.
Can anyone pleas help me :)

I’m using Centos 7
Zoneminder 1.32.3

The system works great

Re: Changing the port from 80

Posted: Thu Jun 27, 2019 11:01 pm
by kitkat
On a stock CentOS/Apache installation you can edit /etc/httpd/conf/httpd.conf and change the line that says "Listen 80" to the port you want.

For SSL, edit /etc/httpd/conf.d/ssl.conf

Restart the httpd service after the change.

Re: Changing the port from 80

Posted: Fri Jun 28, 2019 5:36 am
by Figge71
Thank you for the reply!

It’s the access via web browser that I’m having problems.
I’ve tried that, and it doesn’t do anything. After changing the listen port from 80 to ex. 8989 and restarting https and restarting zoneminder and the computer, zoneminder still listens for port 80.

How do the virtualhost work?
Do I have to change that to?
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 8989

Re: Changing the port from 80

Posted: Fri Jun 28, 2019 10:48 am
by kitkat
OK, it looks like ZM forces HTTPS after the initial connection, so you'll have to change the Listen port in /etc/httpd/conf.d/ssl.conf. Use a different port to the one in httpd.conf.

You'll also have to edit the <VirtualHost> line in ssl.conf and change the port number there as well.

Code: Select all

<VirtualHost _default_:MyPort>
Change myPort to whatever port number you used in the Listen line in the same file.

Then, when you load ZM in your browser, use https://ip.add.re.ss:port/ or the browser will likely try the default SSL port (443) and not be able to connect.

Re: Changing the port from 80

Posted: Fri Jun 28, 2019 7:38 pm
by Figge71
It worked fine 😃 But for some reason ZmNinja stoped working when I did the changes and it doesn’t help to restore the original settings.

I can connect to Zm with the mobile app, but I don’t get any live stream.

Any idea what I can be?

Re: Changing the port from 80

Posted: Fri Jun 28, 2019 8:53 pm
by kitkat
I've not used zmNinja so I don't know, sorry.

You may have more luck asking in the Mobile Apps forum

Re: Changing the port from 80

Posted: Fri Jun 28, 2019 8:57 pm
by Figge71
Thank you anyway!

Have a great weekend:)

Re: Changing the port from 80

Posted: Fri Jun 28, 2019 11:39 pm
by rockedge
did you change the port in the zmNinja settings to reflect the change from port 80 you have made for ZM?