Received: (from majordom@localhost) by hyperreal.com (8.8.5/8.8.5) id BAA26295; Wed, 14 May 1997 01:54:18 -0700 (PDT) Received: from twinlark.arctic.org (twinlark.arctic.org [204.62.130.91]) by hyperreal.com (8.8.5/8.8.5) with SMTP id BAA26286 for ; Wed, 14 May 1997 01:54:15 -0700 (PDT) Received: (qmail 11146 invoked by uid 500); 14 May 1997 08:54:13 -0000 Date: Wed, 14 May 1997 01:54:13 -0700 (PDT) From: Dean Gaudet To: new-httpd@apache.org Subject: Re: mod_dir/576: Port 0 being added in directory redirects (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Is it a bug? Isn't it? I'm getting tired of deciding if the various details involving vhosts are bugs or not. Makes me think the config needs a total overhaul. Anyhow, this one is buggish to me, this patch should fix it but I haven't tested it. If a vhost is configured then it defaults to Port 0. (because * == 0 in the internal representation). Dean ---------- Forwarded message ---------- Date: Tue, 13 May 1997 16:34:09 -0700 (PDT) From: Dean Gaudet To: Jack Holt Cc: apache-bugdb@apache.org Subject: Re: mod_dir/576: Port 0 being added in directory redirects Oh when I looked at the config you posted I thought it did have _default_:80. If it has _default_:* then this problem is entirely expected. Stick a Port 80 into the default server, and/or try out this little patch: Dean Index: http_config.c =================================================================== RCS file: /export/home/cvs/apache/src/http_config.c,v retrieving revision 1.48 diff -u -r1.48 http_config.c --- http_config.c 1997/04/12 04:24:56 1.48 +++ http_config.c 1997/05/13 18:53:08 @@ -957,7 +957,12 @@ /* terminate the list */ *addrs = NULL; if( s->addrs ) { - s->port = s->addrs->host_port; /* set them the same, by default */ + if (s->addrs->host_port) { + s->port = s->addrs->host_port; /* set them the same, by default */ + } else { + /* otherwise we get a port of 0 on redirects */ + s->port = main_server->port; + } } s->next = NULL; On Tue, 13 May 1997, Jack Holt wrote: > > More information: If I replace the > with , /server-info#server shows > the correct port, instead of 0 (I assume redirects will work > under that configuration -- I didn't actually try one.) > > Also, this works if I use , which > will be fine for what I want to do. And, I just tested > redirects with this configuration, and they work. > > The problem seems to be with ":*" in a directive. > I did try and got the port 0 problem > again. Is it that when a virtual host matches, and the port > is specified as "*", it doesn't remeber what port the request > came on, and tries to convert "*" to an int, instead? (I would > grovel a bit through the source, but I've spent enough time on > this today.) > > --Jack > > On Tue, 13 May 1997, Dean Gaudet wrote: > > > Try adding "Port 80" to your main server. You shouldn't have to add a > > Port statement to either of those vhosts. But the Listen statements may > > be messing up the Port of the main server. I'm not sure if this is a bug > > or not though, I'd have to dig. > > > > Dean > > > > > > >