httpd: bad user name apache

on centos when I enter

service httpd start or restart

server gives

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

I tried to add apache user and group, reinstalled httpd so many times but it did not worked either.

8

3 Answers

Run config test

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

Check what users and group set in httpd.conf

User apache
Group apache

Disable SELinux if its enabled.

4

you need to check your apache entire in below config file

/etc/passwd
/etc/group

in Redhat 7 entire should be below

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

I have this problem because the group didnt exist in /etc/group. I created and it worked

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like