日期:2014-05-16  浏览次数:20707 次

linux apache报错

启动apache的服务时,出现如下信息:
??? httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
解决办法:
??? 1.进入apache安装目录下,编辑配置文件./conf/httpd.conf
???? 将httpd.conf文件中的一行:
?????????? # ServerName www.example.com:80 前的注释#去掉。
????? 或者增加一行:
?????????? ServerName localhost:80

?

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

chmod u+s httpd

以普通用户 的身份运行apache ,并且配置的端口为80端口,但是,系统 不允许普通用户使用1024以下的端口

也就是chmod 4755 httpd??目的是授予root权限

*****************************************************************************
处理办法:
# ps -aux | grep http
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root???? 12079 0.0 0.0 61164?? 720 pts/1??? S+?? 16:06?? 0:00 grep http
# ps -aux | grep apache
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
apache?? 10820 0.0 0.0?? 2044?? 600 ???????? Ss?? Jan01?? 0:04 bash
root???? 12081 0.0 0.0 61160?? 716 pts/1??? S+?? 16:06?? 0:00 grep apache
# kill -9 10820
**********************************************************

?lsof -i -P -n

?

firefox-b 2648 hudeyong926?? 68u? IPv4? 49154????? 0t0? TCP 192.168.1.103:56175->37.61.54.158:80 (SYN_SENT)
firefox-b 2648 hudeyong926?? 69u? IPv4? 49149????? 0t0? TCP 192.168.1.103:52331->74.125.71.147:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 70u? IPv4? 49157????? 0t0? TCP 192.168.1.103:35678->69.167.143.172:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 71u? IPv4? 49038????? 0t0? TCP 192.168.1.103:47109->74.125.71.95:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 73u? IPv4? 49144????? 0t0? TCP 192.168.1.103:39975->203.190.126.131:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 74u? IPv4? 49148????? 0t0? TCP 192.168.1.103:59305->50.17.204.67:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 75u? IPv4? 49097????? 0t0? TCP 192.168.1.103:37692->208.93.141.80:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 76u? IPv4? 49086????? 0t0? TCP 192.168.1.103:37690->208.93.141.80:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 77u? IPv4? 49150????? 0t0? TCP 192.168.1.103:47155->74.125.71.95:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 78u? IPv4? 49155????? 0t0? TCP 192.168.1.103:35677->69.167.143.172:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 79u? IPv4? 49101????? 0t0? TCP 192.168.1.103:37957->173.1.40.130:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 80u? IPv4? 49126????? 0t0? TCP 192.168.1.103:54134->216.137.53.110:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 81u? IPv4? 49112????? 0t0? TCP 192.168.1.103:37960->173.1.40.130:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 82u? IPv4? 49102????? 0t0? TCP 192.168.1.103:37958->173.1.40.130:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 83u? IPv4? 49044????? 0t0? TCP 192.168.1.103:59353->74.125.71.139:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 84u? IPv4? 48981????? 0t0? TCP 192.168.1.103:37906->173.1.40.130:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 85u? IPv4? 49049????? 0t0? TCP 192.168.1.103:53674->203.208.46.185:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 86u? IPv4? 48825????? 0t0? TCP 192.168.1.103:51337->216.137.53.79:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 87u? IPv4? 49113????? 0t0? TCP 192.168.1.103:37961->173.1.40.130:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 88u? IPv4? 49124????? 0t0? TCP 192.168.1.103:34446->74.125.71.132:80 (ESTABLISHED)
firefox-b 2648 hudeyong926?? 89u? IPv4? 49076????? 0