?
Solved

Apache timeout remote connection if not port 80

Posted on 2016-10-14
10
Medium Priority
?
131 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 29

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 29

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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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 29

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 2000 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

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

771 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