Changing the port from 80

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
Figge71
Posts: 11
Joined: Sun Nov 25, 2018 6:12 pm

Changing the port from 80

Post by Figge71 » Thu Jun 27, 2019 7:28 pm

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

kitkat
Posts: 88
Joined: Sun Jan 27, 2019 5:17 pm

Re: Changing the port from 80

Post by kitkat » Thu Jun 27, 2019 11:01 pm

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.

Figge71
Posts: 11
Joined: Sun Nov 25, 2018 6:12 pm

Re: Changing the port from 80

Post by Figge71 » Fri Jun 28, 2019 5:36 am

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

kitkat
Posts: 88
Joined: Sun Jan 27, 2019 5:17 pm

Re: Changing the port from 80

Post by kitkat » Fri Jun 28, 2019 10:48 am

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.

Figge71
Posts: 11
Joined: Sun Nov 25, 2018 6:12 pm

Re: Changing the port from 80

Post by Figge71 » Fri Jun 28, 2019 7:38 pm

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?

kitkat
Posts: 88
Joined: Sun Jan 27, 2019 5:17 pm

Re: Changing the port from 80

Post by kitkat » Fri Jun 28, 2019 8:53 pm

I've not used zmNinja so I don't know, sorry.

You may have more luck asking in the Mobile Apps forum

Figge71
Posts: 11
Joined: Sun Nov 25, 2018 6:12 pm

Re: Changing the port from 80

Post by Figge71 » Fri Jun 28, 2019 8:57 pm

Thank you anyway!

Have a great weekend:)

rockedge
Posts: 1106
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Changing the port from 80

Post by rockedge » Fri Jun 28, 2019 11:39 pm

did you change the port in the zmNinja settings to reflect the change from port 80 you have made for ZM?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests