在進行linux運維時,網站前端環境http無法啟動,顯示報錯如下錯:
/etc/init.d/httpd start
Starting httpd: [Sat Jan 29 17:49:00 2011] [warn] module antibot_module is already loaded, skipping
Use proxy forward as remote ip : true.
Antibot exclude pattern : .*.[(js|css|jpg|gif|png)]
Antibot seed check pattern : login
(98)Address already in use: make_sock: could not bind to address [::]:7080
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:7080
no listening sockets available, shutting down
Unable to open log [FAILED]
其實出現這樣的報錯的原因有以下兩種:
1)端口被占用:看似是7080端口被占用,于是用netstat -npl|grep 7080查看了之后,發現7080并沒有占用;
2)端口被重復的寫在了配置文件中,比如在以下兩個文件同時寫了Listen 7080
/etc/httpd/conf/http.conf
/etc/httpd/conf.d/t.10086.cn.conf
所以不管是原因一還是原因二,都可以用如下解決方法:
注釋掉/etc/httpd/conf.d/t.10086.cn.conf的Listen 7080,最后重新啟動,問題就解決了。