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

I don't know what's wrong, I just changed /etc/httpd/conf/httpd.conf and now I can't access it from non-loopback address.

After the change:

Listen 2999
<VirtualHost *:*>
    DocumentRoot "/var/www/html"
</VirtualHost>

Output of lsof -i:2999

COMMAND   PID   USER   FD   TYPE   DEVICE SIZE NODE NAME
httpd   23989   root    4u  IPv4 27581116       TCP *:remoteware-un (LISTEN)
httpd   24001 apache    4u  IPv4 27581116       TCP *:remoteware-un (LISTEN)
httpd   24002 apache    4u  IPv4 27581116       TCP *:remoteware-un (LISTEN)
httpd   24003 apache    4u  IPv4 27581116       TCP *:remoteware-un (LISTEN)
httpd   24004 apache    4u  IPv4 27581116       TCP *:remoteware-un (LISTEN)
httpd   24005 apache    4u  IPv4 27581116       TCP *:remoteware-un (LISTEN)
httpd   24006 apache    4u  IPv4 27581116       TCP *:remoteware-un (LISTEN)
httpd   24007 apache    4u  IPv4 27581116       TCP *:remoteware-un (LISTEN)
httpd   24008 apache    4u  IPv4 27581116       TCP *:remoteware-un (LISTEN)

I can access apache using nc localhost 2999 or w3m http://localhost:2999
But I can't access 2999 port using my ip or dns. I can access other ports using my ip or DNS.

I don't have an idea what's wrong. Iptables isn't blocking that port.

EDIT: Wait a second, I found that apache is showing me the Apache 2 Test Page instead of my web site. And using nmap -v -A localhost I can't see the port 2999.

share|improve this question
    
Please provide the exact errors you get when you attempt to connect, and provide some evidence that iptables isn't in the way, with the output of iptables -L -n -v and iptables -t nat -L -n -v. –  womble Aug 11 '11 at 7:53
    
Okay I guess your right, I stopped iptables with service stop iptables and it worked. Now I'll have to see what's wrong with iptables. –  TiansHUo Aug 11 '11 at 8:12

1 Answer 1

up vote 1 down vote accepted

You probably have a firewall running and need to open port 2999. If you tell us what OS you are running we should be able to help you sort that out.

Check that you have your NameVirtualHost directive set correctly

NamevirtualHost *:2999
share|improve this answer
    
Sorry, but I can easily open ports with other applications, its not port 2999 that's the problem, its apache --- I can change the port in httpd.conf and still it doesn't work –  TiansHUo Aug 11 '11 at 7:43

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.