Solved

Apache timeout remote connection if not port 80

Posted on 2016-10-14
10
114 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

729 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