无法将apache重启到Linux Mint上


1

Linux Mint是Virtual Box上的Guest System

Windows 8.1是主机系统

danko@danko-VirtualBox ~ $ sudo /etc/init.d/apache2 restart

[sudo] password for danko: 

 Restarting web server apache2                           
 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

AH00015: Unable to open logs

Action 'start' failed.

Apache错误日志可能包含更多信息。[fail] apache2实例在20秒内没有启动。请阅读日志文件以发现问题

Apache错误日志为空

danko @ danko-VirtualBox~ $ netstat -punta | grep LISTEN

(并非所有流程都可以识别,不会显示非自有流程信息,您必须是root才能看到所有流程。)

tcp        0      0 0.0.0.0:139             0.0.0.0:*            LISTEN      -               
tcp        0      0 0.0.0.0:80              0.0.0.0:*            LISTEN      -               
tcp        0      0 127.0.1.1:53            0.0.0.0:*            LISTEN      -               
tcp        0      0 127.0.0.1:631           0.0.0.0:*            LISTEN      -               
tcp        0      0 0.0.0.0:445             0.0.0.0:*            LISTEN      -               
tcp6       0      0 :::139                  :::*                 LISTEN      -               
tcp6       0      0 :::80                   :::*                 LISTEN      -               
tcp6       0      0 ::1:631                 :::*                 LISTEN      -               
tcp6       0      0 :::445                  :::*                 LISTEN 

Answers:


0

Apache无法启动,因为端口80已被其他进程使用(由输出确认netstat)。运行以下命令以查看该进程是什么:

sudo lsof -i | grep "http (LISTEN)"

一旦确定了该进程是什么,就可以(干净地)停止它,然后启动Apache。


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.