Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm writing a website that I'm having some trouble getting online with a Debian server using Apache2. When I run the site on port 8080 (i.e. www.example.com:8080), the whole thing runs fine and the page is loaded. However, when I tell Apache to use port 80 instead, it doesn't work. When I visit it (i.e. www.example.com), it just seems to load endlessly.

I made sure that port 8080 was changed to port 80 in both /etc/apache2/ports.conf and /etc/apache2/sites-enabled/mysitesfile. I also made sure to restart the apache server after doing this: afterwards, Nmap showed Apache listening on port 80.

I determined earlier that both port 80 and port 8080 were indeed open on the server. So what gives? So long as both port 80 and port 8080 are open, what could be causing a problem where it works on one but not the other? Were there files that needed to be edited that I didn't edit?

Any help would be VERY much appreciated!

share|improve this question
    
can you confirm three-way traffic with: tcpdump -i INSERTINTERFACENAMEHERE port 80? Also, is HostnameLookups Off in the httpd.conf file? –  Rilindo Dec 23 '11 at 21:59
    
The result of the tcpdump command was: tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth3, link-type EN10MB (Ethernet), capture size 65535 bytes. Was that what you were looking for? Also, /etc/apache2/httpd.conf appears to be completely empty. –  candrews Dec 23 '11 at 22:07
    
Okay, I forgot, this is Debian. Look at apache2.conf. However, assuming that you are listening on the port that your IP is attached, this suggest that traffic is not evening coming through in the begin. Can you run that in another window and then do a nc -z localhost 80? –  Rilindo Dec 23 '11 at 22:12
    
You may want to consider testing something that's not port 80. @chakram88's answer is probably the most likely to be right given what we know, but trying to connect on port 81, 82, etc., might give you more information as to rather the problem lies on your server, network, or ISP. –  Andrew M. Dec 24 '11 at 3:43
    
Troubleshoot. Does netstat show Apache listening on port 80? What IP is it bound to? Can you telnet to port 80 from the local machine? From a remote machine? –  David Schwartz Dec 24 '11 at 4:08

1 Answer 1

up vote 0 down vote accepted

Where is the server located?

If you are running this server at home, your ISP may be blocking port 80.

share|improve this answer
    
Nope, the server is running at school (a .edu domain). Is there any way to check from a remote computer whether the port is blocked by some intermediary? –  candrews Dec 23 '11 at 22:08
    
Yeah. Can you connect to the site within the same network on port 80, then try again from a system outside your router/firewall. If it works inside the same subnet but not outside, then something between is blocking it. –  Bart Silverstrim Dec 23 '11 at 22:21
    
Or, since it's a .edu (college?) you contact their IT department and ask if they're blocking the port. Is this running from a dorm? If so, then it's absolutely no surprise they'd block it. Students abusing network access is a huge problem for EDU's... –  Bart Silverstrim Dec 23 '11 at 22:22
    
You can work out where it's firewalled with tcptraceroute (tracing on port 80) –  tumbleweed Dec 24 '11 at 0:41
    
The preferred method is to telnet <hostname> 80, which will open up a raw connection to the port--this doesn't rely on an existing service being setup. –  Andrew M. Dec 24 '11 at 3:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.