问题:
某天研发某同事说网站前端环境http无法启动,我上去看了下。报如下错:
/etc/init.d/httpdstart Startinghttpd:[SatJan2917:49:002011][warn]moduleantibot_moduleisalreadyloaded,skipping Useproxyforwardasremoteip:true. Antibotexcludepattern:.*.[(js|css|jpg|gif|png)] Antibotseedcheckpattern:login (98)Addressalreadyinuse:make_sock:couldnotbindtoaddress[::]:7080 (98)Addressalreadyinuse:make_sock:couldnotbindtoaddress0.0.0.0:7080 nolisteningsocketsavailable,shuttingdown Unabletoopenlog[FAILED]
原因:
1)端口被占用:表面看是7080端口被占用,于是netstat-npl|grep7080看了下发现7080没有占用;2)在配置文件中重复写了端口,如果在以下两个文件同时写了Listen7080
/etc/httpd/conf/http.conf /etc/httpd/conf.d/t.10086.cn.conf
解决:注释掉/etc/httpd/conf.d/t.10086.cn.conf的Listen7080,重启,OK。