root@server:/etc/apache2/sites-enabled# /etc/init.d/apache2 restart
重啟錯誤出現
* Restarting web server apache2 (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 Action 'start' failed. The Apache error log may have more information.
使用netstat 查找80 port被aolserver4-nsd這支程式佔用了
root@server:/etc/apache2/sites-enabled# netstat -tlnup | grep 80
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 1181/aolserver4-nsd
解決方法先殺掉程序重啟apache
kill -9 1181 /etc/init.d/apache2 restart
將aolserver4這個從開機啟動移除,或是解除安裝
chkconfig aolserver4 off chkconfig --list | grep aolserver4 aolserver4 0:off 1:off 2:off 3:off 4:off 5:off 6:off apt-get remove aolserver4