Linux httpd 无法启动且没有错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20001423/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
httpd won't start and no error
提问by BentCoder
httpd won't start when I run:
service httpd start
or service httpd restart
当我运行时 httpd 不会启动:
service httpd start
或service httpd restart
I don't get error apart from [FAILED]
bit in red.
除了[FAILED]
红色之外,我没有得到任何错误。
/var/log/httpd/error_log
is empty.
/var/log/httpd/error_log
是空的。
/var/log/message
has line below:
/var/log/message
下面有一行:
Nov 15 13:23:06 localhost kernel: audit(1384521786.787:32): avc: denied { name_bind } for pid=31935 comm="httpd" src=8000 scontext=root:system_r:httpd_t:s0 tcontext=system_u:object_r:soundd_port_t:s0 tclass=tcp_socket
Any idea why it won't start or any solution?
知道为什么它不会启动或任何解决方案吗?
Looked at this: Apache wont start but shows no errors
看着这个:Apache不会启动,但没有显示错误
I haven't rebooted the system yet though which is last option.
我还没有重新启动系统,但这是最后一个选择。
Thanks
谢谢
[root@localhost ~]# httpd -v
Server version: Apache/2.2.3
Server built: Sep 11 2006 09:43:00
[root@localhost ~]# service httpd status
httpd is stopped
采纳答案by cptPH
The message from /var/log/message
looks like SELinux is on.
来自/var/log/message
SELinux的消息似乎已开启。
Try: getenforce
, it reports whether SELinux is enforcing, permissive, or disabled.
Try: getenforce
,它报告 SELinux 是强制执行、许可还是禁用。
If it's on enforcing, setenforce 0
to see if that's whats causing the problem.
如果是强制执行,setenforce 0
看看这是否是导致问题的原因。
If it realy was SELinux you should set the proper settings and reactivate it ;-)
Also turning SELinux off by using setenforce 0
, only lasts until the next reboot!
Permanently turning it off by changing SELINUX=enforcing
to SELINUX=permissive
in /etc/selinux/config
.
如果它真的是 SELinux,你应该设置正确的设置并重新激活它 ;-) 同时使用 关闭 SELinux setenforce 0
,只持续到下一次重新启动!通过更改SELINUX=enforcing
为SELINUX=permissive
in永久关闭它/etc/selinux/config
。
My second guess would be that iptables/firewalld is blocking the port for httpd.
我的第二个猜测是 iptables/firewalld 阻塞了 httpd 的端口。