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.

iptablesisn't in the way, with the output ofiptables -L -n -vandiptables -t nat -L -n -v. – womble Aug 11 '11 at 7:53service stop iptablesand it worked. Now I'll have to see what's wrong with iptables. – TiansHUo Aug 11 '11 at 8:12