Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

on centos when I enter

service httpd start or restart

server gives

Starting httpd: httpd: bad user name apache

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

share|improve this question

migrated from Dec 28 '12 at 19:11

This question came from our site for professional and enthusiast programmers.

when you tried to create apache user were you able to create it? or that failed too? – Hanky Panky Dec 28 '12 at 13:56
I can create the user. Also I checked it from /etc/passwd and /etc/group files – irukeru Dec 28 '12 at 13:57
Try 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. – scragar Dec 28 '12 at 13:58
I 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 :/ – irukeru Dec 28 '12 at 14:17
if 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) – xhudik Dec 28 '12 at 14:21
up vote 3 down vote accepted

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.

share|improve this answer
disabling SELinux solved the problem. thanks a lot =)) – irukeru Dec 28 '12 at 16:07
but when I reboot server I have to disable SELinux again. what should I do for this problem ? – irukeru Dec 28 '12 at 18:17
Disable permanently selinux edit /etc/sysconfig/selinux SELINUX=disabled – Satish Dec 28 '12 at 18:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.