Link to home
Create AccountLog in
Avatar of Rawand Amin
Rawand Amin

asked on

Apache timeout remote connection if not port 80


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.

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

Listen 9080

Thanks in advance
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

What do you see when run wireshark?
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.
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.
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?
Sound like you may have a default (or other than default) iptables rules set applied?
What is the output of
iptables -L -n
The firewall should be disabled according to the author.
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"?
Avatar of Rawand Amin
Rawand Amin


Thank you all, I will keep port 80 as default.  it is much easier.
Avatar of skullnobrains

Link to home
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Thanks for your help