httpd:錯誤的使用者名稱 apache

httpd:錯誤的使用者名稱 apache

當我進入centos時

service httpd start或者restart

伺服器給出

Starting httpd: httpd: bad user name apache
                                                           [FAILED]

我嘗試新增 apache 使用者和群組,重新安裝 httpd 多次,但也沒有成功。

答案1

運行配置測試

[root@9001 conf_0.d]# /etc/init.d/httpd configtest
Syntax OK

檢查httpd.conf中設定的使用者和群組

User apache
Group apache

如果已啟用 SELinux,請將其停用。

答案2

你需要在下面的設定檔中檢查你的apache

/etc/passwd 
/etc/group

在 Redhat 7 中整個應該在下面

/etc/passwd > apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin
/etc/group > apache:x:48:

答案3

我遇到這個問題是因為 /etc/group 中不存在該群組。我創建了並且成功了

相關內容