apache启动端口被占用解决办法

sudo service apache2 restart 报错
* Restarting web server apache2                                                (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.
The Apache error log may have more information.
                                                                         [fail]
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems

查下80端口占用情况,被nginx占用了。
mochong@bogon:~$ sudo  netstat -lnp|grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1118/nginx

sudo service nginx stop
停掉nginx。再
sudo service apache2 restart
启动成功

猜你喜欢

转载自lhdst-163-com.iteye.com/blog/2327978