eMac apache questions about root and user

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
MichaelB
Forum Newbie
Posts: 6
Joined: Sat Jun 19, 2004 1:37 pm
Location: Florida

eMac apache questions about root and user

Post 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
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post 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.
MichaelB
Forum Newbie
Posts: 6
Joined: Sat Jun 19, 2004 1:37 pm
Location: Florida

Thank you

Post 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
MichaelB
Forum Newbie
Posts: 6
Joined: Sat Jun 19, 2004 1:37 pm
Location: Florida

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

Post 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
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post 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).
Post Reply