在进行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,最后重新启动,问题就解决了。