httpd: bad user name apache
35,716
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.
Related videos on Youtube
Author by
irukeru
Updated on September 18, 2022Comments
-
irukeru over 1 year
on centos when I enter
service httpd start
orrestart
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.
-
Admin over 11 yearswhen you tried to create apache user were you able to create it? or that failed too?
-
Admin over 11 yearsI can create the user. Also I checked it from /etc/passwd and /etc/group files
-
Denis over 11 yearsTry creating it from init.
cd /etc/init.d; sudo ./httpd start
A bit of googling revealed that a lot of people have problems with it overriding the config settings with environment variables. -
Admin over 11 yearsI tried this too but it gives the same error :( I googled this error and non of the solutions helped me. I changed file permissions, config file etc :/
-
Admin over 11 yearsif no solution helps, uninstall and install it again. If still fails, try to build it on your own (not install via yum,.. but build from source)
-
Admin over 11 yearsThis may be what you are looking for: drjohnstechtalk.com/blog/2012/03/…
-
Admin over 11 yearsI reinstall via yum so many times. I'll try building from source. thanks.
-
Fr0zenFyr over 8 yearsDarn!! I can't believe that I made a mistake in group name called it
Www-data
instead ofwww-data
... hope this check helps someone...
-
-
Admin over 11 yearsbut when I reboot server I have to disable SELinux again. what should I do for this problem ?
-
Admin over 11 yearsDisable permanently selinux edit /etc/sysconfig/selinux SELINUX=disabled
-
Euli almost 5 yearsImo, disabling SELinux is not a good advice. At least explain, why SELinux could cause the problem.