Page 1 of 1

eMac apache questions about root and user

Posted: Mon Jun 21, 2004 7:15 pm
by MichaelB
Apache runs now when I start it logged in at root, not user. I have been reading at apache web site and still not sure about when and when not to
be the user or root doing apache, php and (mysql later on). The on-off
power thing wasn't the solution to 127.0.0.1.

Questions:
When I am doing apache and php , should I be in root (logged in) , completely as root?

When doing php should I be user?

When should I not be in root then be the user, and when I should be the user and not root?

Thanks,
MichaelB

Posted: Mon Jun 21, 2004 11:20 pm
by kettle_drum
Well you will need to have admin rights to be able to turn apache on and off - otherwise any user could stop the web sever and it would cause problems. You just dont want apache to be running as root - which it shouldnt be - theres usually a http user that apache runs as.

To turn it on and off as a normal user you will need to sudo up before using the apachectl command.

Thank you

Posted: Tue Jun 22, 2004 10:19 am
by MichaelB
I get it now, just a beginner at this material. Apache and PHP running
ok so far.

Thank you,javascript:emoticon(':P')
MichaelB

Is this normal? Apache starts when emac turn on as user

Posted: Tue Jun 22, 2004 5:45 pm
by MichaelB
This is normal right?
That's nice it starts Apache when I log in at User and when I turn on my eMac but I have to turn it off by root. This is normal right?

Thanks,
MichaelB

Posted: Tue Jun 22, 2004 5:49 pm
by markl999
Apache initially starts as root and then switches to the User/Group defined in your httpd.conf for the remianing instances, so yeah, you need root permissions to start/stop it (in 99.9% of cases).