httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: How about mixing BindAddress and VirtualHost???
Date Fri, 09 Feb 1996 12:00:08 GMT
> I wrote:
> >>Anyone care?  Anyone looked at patching Apache so you could list
> >>multiple BindAddress's (possibly in the <VirtualHost> section) to
> >>get around this?
> >
> >What you would have to do is
> >1. Create a socket for every bound address.
> >2. Do a simultaneous accept on all the sockets.
> >   This can only be done by using select on all these sockets, waiting
> >   for a 'read' condition. Under Solaris at least, this indicates that
> >   that a connection is pending.
> >
> >   Check the man page for accept on you system to see if it supports this.
> >
> >David.
> Yesterday, I got to thinking, what if this were portable?

This is pretty certain to be portable for three reasons:

1. select was invented to deal with socket operations.

2. All known TCP/IP implementations are derived from the original BSD sockets.

3. I have portable code already which does _everything_ through a select.

> You could have apache bind to mulitple ports, and so run virtual servers
> on different ports, e.g. and
> For example, one of them could be a proxy-only server.
> You could also have apache serve multiple protocols simultanously;
> e.g. http, https, gopher, ftp... So how about an Apache ftp server?
> Maybe we really do want a protocol API.

Of course we do! I really must take a look at that phreads stuff...

>  David.

Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant        Fax:   +44 (181) 994 6472
and Technical Director      Email:
A.L. Digital Ltd,           URL:
London, England.

View raw message