Solved

Apache timeout remote connection if not port 80

Posted on 2016-10-14
10
104 Views
Last Modified: 2016-11-02
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
0
Comment
Question by:Rawand Amin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 28

Expert Comment

by:Jan Springer
ID: 41843404
What do you see when run wireshark?
0
 
LVL 4

Expert Comment

by:jessbruffett
ID: 41843452
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
 
LVL 28

Expert Comment

by:Jan Springer
ID: 41843458
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:jessbruffett
ID: 41843464
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
 
LVL 12

Expert Comment

by:Kent W
ID: 41843728
Sound like you may have a default (or other than default) iptables rules set applied?
What is the output of
iptables -L -n
?
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 41843758
The firewall should be disabled according to the author.
0
 
LVL 12

Expert Comment

by:Kent W
ID: 41843883
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
 

Author Comment

by:Rawand Amin
ID: 41849559
Thank you all, I will keep port 80 as default.  it is much easier.
0
 
LVL 27

Accepted Solution

by:
skullnobrains earned 500 total points
ID: 41849815
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
 

Author Closing Comment

by:Rawand Amin
ID: 41869946
Thanks for your help
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question