Koozali.org: home of the SME Server

how to change apache default listening port on sme 5.6

John

how to change apache default listening port on sme 5.6
« on: October 21, 2003, 08:04:07 AM »
Does anyone know how to do this?? I need apache to listen to another port instead of port 80..I've searched and i found a few how to's but there for sme 5.1.2
sme 5.6 doesn't have a file called 80Aliases00 that the how to for 5.1.2 says u also have to modify

Jon Blakely


CH Cheah


John

Re: how to change apache default listening port on sme 5.6
« Reply #3 on: October 21, 2003, 10:04:23 PM »
Thanks tried that early this moring still with no luck...
i changed 80 to 6329 in the following files
05port
80virtualhosta
80namevirtualhosts
35listen80

expanded the template restarted httpd
I'm sure the new port works cause i can only access my photogallery and server-manager if i specify port 6329 but only from my internal lan
No one can access it from outside my lan they get page can't be displayed
Even tried forwardingexternal port 6329 to 192.168.241.89:6329 on the sme internal nic still no go

CH Cheah

Re: how to change apache default listening port on sme 5.6
« Reply #4 on: October 22, 2003, 12:46:50 AM »
Is www listening at port 6329
What does the following tell you

netstat -a |grep LISTEN
netstat -a -n |grep LISTEN

Kevin

Re: how to change apache default listening port on sme 5.6
« Reply #5 on: October 22, 2003, 08:28:24 AM »
After making my custom templates I could also access my web pages only on the local LAN.  Read elsewhere in these forums that the port opening RPM doesn't really do anything.................. but after I installed the rpm and opened the new port I could get to my web pages from the internet.  It worked for me!

Also, do you have a router between your server and modem?  If so make certain to redirect your new port to the server or put the server in the DMZ.

Charlie Brady

Re: how to change apache default listening port on sme 5.6
« Reply #6 on: October 22, 2003, 08:13:02 PM »
Kevin wrote:

> After making my custom templates I could also access my web
> pages only on the local LAN.  Read elsewhere in these forums
> that the port opening RPM doesn't really do
> anything.................. but after I installed the rpm and
> opened the new port I could get to my web pages from the
> internet.  It worked for me!

It's not that it doesn't do anything, it's that it doesn't do what many people apparently think it does, and what it does do is better done another way.

In your case, you need a custom template for /etc/rc.d/init.d/masq/45AllowHTTP and change port 80 to the port that you now have apache listening to. Activate that template, and you'll now find that you can remove the "port opening" contrib.

You changed the port that apache listened to, but didn't change the pinhole through which connections are allowed in through the firewall.

Charlie

Kevin

Re: how to change apache default listening port on sme 5.6
« Reply #7 on: October 23, 2003, 08:53:16 PM »
Thanks for the tip Charlie.  Since it's a better way of doing things I will make the changes this weekend.

Kevin