Avatar of Rawand Amin
Rawand Amin
 asked on

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
LinuxApache Web Server

Avatar of undefined
Last Comment
Rawand Amin

8/22/2022 - Mon
Jan Bacher

What do you see when run wireshark?
Jesse Bruffett

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.
Jan Bacher

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.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Jesse Bruffett

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?
Kent W

Sound like you may have a default (or other than default) iptables rules set applied?
What is the output of
iptables -L -n
?
Jan Bacher

The firewall should be disabled according to the author.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Kent W

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"?
Rawand Amin

ASKER
Thank you all, I will keep port 80 as default.  it is much easier.
ASKER CERTIFIED SOLUTION
skullnobrains

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Rawand Amin

ASKER
Thanks for your help
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck