httpd:错误的用户名 apache

iru*_*eru 3 linux centos apache-http-server httpd centos-5

当我进入时在 centos

service httpd start 或者 restart

服务器给

Starting httpd: httpd: bad user name apache
                                                           [FAILED]
Run Code Online (Sandbox Code Playgroud)

我尝试添加 apache 用户和组,重新安装 httpd 很多次,但它也不起作用。

小智 5

运行配置测试

[root@9001 conf_0.d]# /etc/init.d/httpd configtest
Syntax OK
Run Code Online (Sandbox Code Playgroud)

检查 httpd.conf 中设置的用户和组

User apache
Group apache
Run Code Online (Sandbox Code Playgroud)

如果启用,请禁用 SELinux。

  • 禁用 SELinux 解决了这个问题。非常感谢 =)) (2认同)