我试图重新启动Apache 2.2.14(在Ubuntu 10.04上也使用PHP 5.3.2,以root身份运行所有命令)。 它关机,但不会启动。 这是一个全新的VPS,没有防火墙或IP表。 当我运行apache2ctl start ,我得到这个回应:
(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
apache2ctl status产生这个:
Looking up localhost Making HTTP connection to localhost Alert!: Unable to connect to remote host. lynx: Can't access startfile http://localhost/server-status 'www-browser -dump http://localhost:80/server-status' failed. Maybe you need to install a package providing www-browser or you need to adjust the APACHE_LYNX variable in /etc/apache2/envvars
lsof | grep http lsof | grep http什么都不返回
netstat -plant :
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1139/mysqld tcp 0 0 209.40.198.146:53 0.0.0.0:* LISTEN 1153/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1153/named tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1125/sshd tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1153/named tcp 0 240 209.40.198.146:22 66.214.136.198:37853 ESTABLISHED 1280/0 tcp6 0 0 :::53 :::* LISTEN 1153/named tcp6 0 0 :::22 :::* LISTEN 1125/sshd tcp6 0 0 ::1:953 :::* LISTEN 1153/named
我是一个Linux新手,但我看到的所有其他东西都被要求提供这些报告。 没有任何东西阻塞端口80,但Apache不会绑定到它。 是Apache的问题? 我有虚拟主机设置,但他们非常简单,我曾经使用过相同的configuration。 如果需要,我可以发布.conf文件。
apache2ctl -t :Syntac OK
service apache2 start :
(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
假设你以root身份运行apache( service apache start比apachectl更好),因为用户不能绑定特权端口,请检查你是否有语法错误:
apachechtl -t
然后检查你的NameServer指令configuration和parsing机制。
确保您的NameServer myhost.example.com是指可以parsing的地址(检查/ etc / hosts或您的DNScaching)。