我运行sudo /etc/init.d/apache2 start
并得到这个:
Starting httpd2 (prefork) (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1
failed
这意味着有东西正在使用端口 80,对吧?所以我运行sudo netstat -anp | grep 80
:
tcp 0 0 192.168.0.252:48407 72.233.69.5:80 ESTABLISHED 22710/chrome
tcp 0 0 192.168.0.252:59151 74.125.226.68:80 ESTABLISHED 22710/chrome
tcp 0 0 192.168.0.252:39954 209.85.225.102:80 ESTABLISHED 22710/chrome
tcp 0 0 192.168.0.252:59845 74.125.226.69:80 ESTABLISHED 22710/chrome
tcp 0 0 192.168.0.252:48405 72.233.69.5:80 ESTABLISHED 22710/chrome
tcp 0 0 192.168.0.252:45756 208.44.23.97:80 ESTABLISHED 22710/chrome
tcp 0 0 192.168.0.252:57631 50.16.231.47:80 ESTABLISHED 22710/chrome
tcp 0 0 192.168.0.252:48404 72.233.69.5:80 ESTABLISHED 22710/chrome
unix 3 [ ] STREAM CONNECTED 221080192 22759/ --disable-we
unix 3 [ ] STREAM CONNECTED 221080191 22886/npwrapper.lib
unix 3 [ ] STREAM CONNECTED 221080189 22907/npviewer.bin
unix 3 [ ] STREAM CONNECTED 221080188 2351/Xorg @/tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 221080128 22886/npwrapper.lib
unix 3 [ ] STREAM CONNECTED 221080094 2351/Xorg @/tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 221069080 22710/chrome
unix 3 [ ] STREAM CONNECTED 220845880 5186/master
unix 3 [ ] STREAM CONNECTED 156358076 24712/gvfs-gphoto2-
unix 3 [ ] STREAM CONNECTED 156358066 3025/dbus-daemon @/tmp/dbus-eEbaAghTui
unix 3 [ ] STREAM CONNECTED 156358065 24709/gvfs-afc-volu
unix 3 [ ] STREAM CONNECTED 156358058 24704/gvfs-gdu-volu
unix 3 [ ] STREAM CONNECTED 156026080 24604/sde (every 2
unix 3 [ ] STREAM CONNECTED 81194780 1975/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 226086 9080/kwalletmanager
unix 3 [ ] STREAM CONNECTED 226617 9080/kwalletmanager
unix 3 [ ] STREAM CONNECTED 225968 9080/kwalletmanager
unix 3 [ ] STREAM CONNECTED 226597 9080/kwalletmanager
unix 3 [ ] STREAM CONNECTED 23808 1975/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 23807 4358/nepomukservice
unix 3 [ ] STREAM CONNECTED 16680 3025/dbus-daemon @/tmp/dbus-eEbaAghTui
unix 3 [ ] STREAM CONNECTED 15080 4052/kgpg
unix 3 [ ] STREAM CONNECTED 12380 1975/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 9803 2351/Xorg @/tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9802 3024/dbus-launch
unix 3 [ ] STREAM CONNECTED 8062 2728/polkitd
unix 3 [ ] STREAM CONNECTED 8051 2658/console-kit-da
unix 3 [ ] STREAM CONNECTED 8014 1975/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 8004 1975/dbus-daemon /var/run/dbus/system_bus_socket
看来 Chrome 只使用了 80,所以我看不出问题出在哪里。有什么想法吗?
答案1
Chrome 没有监听本地端口,80
而只是连接到远程端口80
。
我确实没看到什么问题。但请尝试指定一个要监听的 IP,因为目前 IPv6 似乎无法监听...