Reload/Graceful Restart Apache

Reload/Graceful Restart Apache

am 01.04.2008 23:48:46 von xyon

Hello all,

I've got a modperl app that changes some apache configs (via text
files), but need to tell Apache to re-read its configuration files for
the changes to take effect. What might be the best way of going about
such an operation?

Here is some info about my install:

# cat /etc/redhat-release && rpm -qa httpd mod_perl
CentOS release 4.6 (Final)
httpd-2.0.59-1.el4s1.10.el4.centos
mod_perl-2.0.3-1.el4s1.3

Re: Reload/Graceful Restart Apache

am 01.04.2008 23:55:13 von Sean Davis

On Tue, Apr 1, 2008 at 5:48 PM, xyon wrote:
> Hello all,
>
> I've got a modperl app that changes some apache configs (via text
> files), but need to tell Apache to re-read its configuration files for
> the changes to take effect. What might be the best way of going about
> such an operation?
>
> Here is some info about my install:
>
> # cat /etc/redhat-release && rpm -qa httpd mod_perl
> CentOS release 4.6 (Final)
> httpd-2.0.59-1.el4s1.10.el4.centos
> mod_perl-2.0.3-1.el4s1.3

If you are doing this by hand, you will always want to stop and then
start the server, not restart.

Sean

Re: Reload/Graceful Restart Apache

am 01.04.2008 23:59:04 von xyon

When you mean by hand, you mean something like:

`/usr/sbin/httpd -k $action`

Where $action could be "stop" and then "start"? I don't think this is
possible, I get permission denied on the socket:

(13)Permission denied: make_sock: could not bind to address [::]:443
no listening sockets available, shutting down
Unable to open logs



On Tue, 2008-04-01 at 17:55 -0400, Sean Davis wrote:
> On Tue, Apr 1, 2008 at 5:48 PM, xyon wrote:
> > Hello all,
> >
> > I've got a modperl app that changes some apache configs (via text
> > files), but need to tell Apache to re-read its configuration files for
> > the changes to take effect. What might be the best way of going about
> > such an operation?
> >
> > Here is some info about my install:
> >
> > # cat /etc/redhat-release && rpm -qa httpd mod_perl
> > CentOS release 4.6 (Final)
> > httpd-2.0.59-1.el4s1.10.el4.centos
> > mod_perl-2.0.3-1.el4s1.3
>
> If you are doing this by hand, you will always want to stop and then
> start the server, not restart.
>
> Sean

Re: Reload/Graceful Restart Apache

am 02.04.2008 00:55:56 von Sean Davis

On Tue, Apr 1, 2008 at 5:59 PM, xyon wrote:
> When you mean by hand, you mean something like:
>
> `/usr/sbin/httpd -k $action`
>
> Where $action could be "stop" and then "start"? I don't think this is
> possible, I get permission denied on the socket:
>
> (13)Permission denied: make_sock: could not bind to address [::]:443
> no listening sockets available, shutting down
> Unable to open logs

This needs to be done as a root or admin user, I believe.

Sean