Apache timeout remote connection if not port 80

Hi

I can access http on port 80 remotly, while when i change the port to other ports 9080, i can connect locally but not remotely.

Note:
Apache version: 2.4
Destribution: centos 7
Firewall status: disabled
SELINUX: disabled

Configuration:
Listen 9080

Thanks in advance
Rawand AminAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jan SpringerCommented:
What do you see when run wireshark?
0
Jesse BruffettM&F-ing SorcererCommented:
Are you trying to set the port in the main httpd.conf file or the vhost config file? in my experience leave as much default in the httpd file as you can and set your custom settings in the vhost config file.
0
Jan SpringerCommented:
I do the same (making mods in the vhosts) but I sometimes also run several instances of apache and it should work fine to just make the change in the regular configuration file.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Jesse BruffettM&F-ing SorcererCommented:
Also for the OP, an eternal question but one that has bitten me more than once, after making the changes you did restart the apache process correct?
0
Kent WSr. Network / Systems AdminCommented:
Sound like you may have a default (or other than default) iptables rules set applied?
What is the output of
iptables -L -n
?
0
Jan SpringerCommented:
The firewall should be disabled according to the author.
0
Kent WSr. Network / Systems AdminCommented:
I glossed right over that, Jan.   Thank you.

OP, can you define "locally"? Is this from the same machine, as in localhost you are hitting apache, or is locally referring to the same LAN / network segment? Is there any security device or NAT device between the apache box and where you are testing from "remotely"?
0
Rawand AminAuthor Commented:
Thank you all, I will keep port 80 as default.  it is much easier.
0
skullnobrainsCommented:
most likely the port 9080 is closed on the client side

you can debug this quite easily
- check with "netstat -lptn" that you actually bind the proper interface(s)
- run "tcpdump -i any port 9080" and try to connect. if nothing appears, your connection does not reach. if you see SYNs but no ACKs something is wrong with the local machine configuration : firewall, apparamor, binding the wrong interface ....
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rawand AminAuthor Commented:
Thanks for your help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.