我只是在使用apache玩而已,它可以正常工作,也就是说,我可以通过浏览到服务器来连接服务器,http://127.0.0.1
而http://192.168.1.5
我没有运行IPv6
但这是netstat的结果
$ sudo service apache2 status
* apache2 is running
$ netstat -an | grep :80
tcp6 0 0 :::80 :::* LISTEN
$ wget 127.0.0.1
--2014-06-26 01:32:15-- http://127.0.0.1/
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11510 (11K) [text/html]
Saving to: ‘index.html’
100%[=====================================================================================================>] 11,510 --.-K/s in 0s
2014-06-26 01:32:15 (161 MB/s) - ‘index.html’ saved [11510/11510]
我期望看到它在侦听常规TCP上的通讯,显然它是这样做的!!
编辑:
$ netstat -a | grep LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
tcp 0 0 localhost:mysql *:* LISTEN
tcp6 0 0 ip6-localhost:ipp [::]:* LISTEN
tcp6 0 0 [::]:https [::]:* LISTEN
tcp6 0 0 [::]:http [::]:* LISTEN
Edit2: 为什么要投反对票?我想念的是谁?
netstat -p
吗?