1825766 Members
2083 Online
109687 Solutions
New Discussion

apache stop and start

 
SOLVED
Go to solution
Shawn McConnell
Advisor

apache stop and start

I have apache installed on a server that I administer.

How can I configure apache so that a user other than root can stop and start apache ?

Can it be done ?

Thanks

Shawn
7 REPLIES 7
Torsten.
Acclaimed Contributor
Solution

Re: apache stop and start

Hi,

the user (owner) is configured in httpd.conf.

Look at the install directory ../conf for this file.
Use ../bin/apachectl start/stop/..
for doing this.
Normally te server is maintained by root and run under ownership of a specified user like "www".

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Shawn McConnell
Advisor

Re: apache stop and start

So if my httpd.conf file has this then eoffice should be able to start and stop apache ?

# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
# . On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user www and use that user.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
#
User eoffice
Group eoffice
A. Clay Stephenson
Acclaimed Contributor

Re: apache stop and start

This is really a perfect application for sudo.
If it ain't broke, I can fix that.
Torsten.
Acclaimed Contributor

Re: apache stop and start

If all necessary files (like the logs - NOT the binaries) owned by eoffice - YES!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Shawn McConnell
Advisor

Re: apache stop and start

It looks like everything is owned by eoffice (including binaries) except for httpd.pid which is owned by root.
Shawn McConnell
Advisor

Re: apache stop and start

Well it looks like I'm going to have to put Sudo on the server. They still couldn't start and stop it themselves. My guess is that since it is on port 80 they couldn't do it.

I'm gonna have to put sudo on there it looks like.

Thanks for your help all.

Shawn
Shawn McConnell
Advisor

Re: apache stop and start

Have to install sudo it looks like.

Thanks

Shawn