httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Griffiths" <n...@adam-griffiths.co.uk>
Subject [users@httpd] Re: Re: starting httpd as a non-root user
Date Thu, 06 Nov 2003 08:35:35 GMT
Thanks Brian

I managed to get a cut down version of my server started as non-root,
without most of my virtual host and with out SSL. It was therefore without
many of the logfiles, one of which must of been causing the error. It was
odd to have apache httpd quit without giving an error message, it mad it
difficult to find the problem.

Regards

Adam


"Brian Dessent" <brian@dessent.net> wrote in message
news:3FA971AF.F3845A7D@dessent.net...
> Adam Griffiths wrote:
> >
> > Thanks for your suggestions, however, I do have Apache is listening
> > exclusively on ports >1024. If I try to start apache listening to a
lower
> > port I get an error message when starting it from a non-root user. So
I'm
> > starting apache listening on port 1234 and my problem is that it exits
with
> > no error message.
>
> In that case it sounds to me like it might be a problem switching to the
> user context to the Apache user and group, or something to do with the
> ownership of the logfiles and/or .pid file and/or the directories that
> contain them.
>
> Perhaps instead of trying to get this to start as a non-root user, just
> let it start up as normal from the rc scripts, and then to restart it
> use something like:
>
> kill -HUP `cat /var/run/httpd.pid`
>
> This does the same as "apachectl graceful", it sends a signal to httpd
> telling it to kill any idle workers and reinitialize and reread
> httpd.conf (but it doesn't actually stop and restart per se.)  You'd
> have to substitute the actual path of the .pid file, and I'm not sure
> how Unix permissions work here... Specifically, I think only the
> superuser can send signals to processes owned by a different user.  In
> that case this may not work, but perhaps you could have Apache running
> as your login user ID and group, via the User and Group settings in
> httpd.conf.  I don't know if that would break other things, though.  And
> even if it didn't the Apache controller process is still running as root
> AFAIK so to send it a signal you'd need to be root.  Sigh.  I just don't
> think Apache was designed for this kind of use.  I'd seriously look into
> getting sudo installed for this instead, it seems like the cleanest
> solution.
>
> Brian
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message