httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Disabling default port
Date Wed, 19 May 2004 18:27:12 GMT

On Wed, 19 May 2004 wrote:

> I have a little configuration script which manipulates httpd.conf then
> gives a SIGHUP to have httpd re-read its configuration.  My goal is to
> enable port 80, port 443, both, or neither.  My script manipulates a
> section that looks like this:
> <IfDefine SSL>
> Listen 80
> Listen 443
> </IfDefine>
> by adding "# " to one line or the other.  But when I want to disable
> access (by commenting out _both_ lines), I can still connect via HTTP to
> port 80.  Is there a way I can disable this easily?  Something a little
> sed script can accomplish.  (I'd prefer to always have httpd running so
> that my script only needs to change httpd.conf and send a signal, not
> worry about whether the demon is running or not.)

Listen 80
is the default if no Listen is present.

So your choices are:
Change to
Listen 12345
or some other obscure port that nobody would guess.  Or simply fix your
script so that it starts apache if it isn't running.  (I believe
"apachectl graceful" will do exactly that, but you should double check.)


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message