views:

31

answers:

2

I want to configure apache to listen on port 8079
I added LISTEN 8079 directive in httpd.conf
I opened 8079 port in iptables / restarted iptables etc. I even stopped iptables service.
"netstat -nal | grep 8079" shows "tcp 0 0 :::8079 :::* LISTEN"

Now, if I try to access http://localhost:8079 or http://myserver.com:8079 from that machine, I can access that page
BUT from any other machine I am not able to access the site on any port other than 80. On port 80, it works. On port 8079 it does not.

what else do I need to configure???? Please help.

If it matters, I use centOS server.

A: 

Open httpd.conf file in your text editor. Find this line:

Listen 80

and change it

Listen 8079

After change, save it and restart apache.

ismailperim
yes, but I mentioned in the first line that I have already tried this "I added LISTEN 8079 directive in httpd.conf" :((
vivek.m
Oh sory. I didnt see it. Can you post httpd.conf file any where? And are you using 3rd party software Wamp,Xampp,Appserv?
ismailperim
you can get httpd.conf here http://www.fileuploading.net/860467nothing like WAMP, Xampp, Appserv. All I have done is compiling apache, tomcat and jk connector from source and trying my best to make them work together.
vivek.m
i didnt find the problem :( everything seems normally. i tried add Listen 8076 line in my local server but its worked normally. Can you try re-setup apache if is possible?
ismailperim
as I said, on localhost it's working on my pc also. anyway, thanks for your answer. i only want to setup communication between apache and tomcat and for that probably apache runnning on port 80 is enough. i am still learning about it.
vivek.m
A: 

It was a firewall issue. There was a hardware firewall that was blocking access to almost all ports. (Turning off software firewall / SELinux bla bla had no effect)

Then I scanned the open ports and used the port that was open.

If you are facing the same problem, Run the following command

sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-65000

It will scan for all the open ports on your system. Any port that is open can be accessed from outside.

Ref.: http://www.go2linux.org/which_service_or_program_is_listening_on_port

vivek.m

related questions