Here's a way to do it without patches:
1. in your webserver:
a. ipfw add fwd localhost from any to 1.2.3/24 http
b. add <VirtualHost...> sections, like this:
<VirtualHost 1.2.3.4>
ServerName web.freebsd.org
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /home/web
</VirtualHost>
2. in your router: add a route to forward 1.2.3/24 to your webserver
Pros:
- no need to 'ifconfig xyz alias...'.
- address matching is fast, since only a few ipfw rules are checked,
rather than lists of hundreds or thousands of IP addresses
Cons:
- I don't think arp will work on 1.2.3/24 addresses, which is why the
route needs to be added to the router.
Try it: it really works, thanks to Julian Elischer.
Matt
Geoff Buckingham wrote:
>
> On Wed, Oct 20, 1999 at 11:02:08AM +0100, Nick Hilliard wrote:
> > > What do you mean by "bind a class C"? Make an interface so it will
> > > respond to incoming requests for 10.1.2.x? ewww, yuck!
> >
> > Is it any less elegant than having in_localaddr() trawling through each item
> > on the address list? Perhaps 1024 items if you've got a large vweb server?
> > That's also pretty inelegant.
> >
>
> The patch refered to elsewhere comes from Demon Internet where it was (at least
> in my time) used to two /18s and a /16 without problems, this would have
> been completely impractical through more conventional means.
>
> As I continue to work with large scale virtual hosting set ups I would quite
> like to see this enter the main source tree, allthough I guess people likely
> to make use of it are a very small minority.
>
> In an effort to avoid what may follow, I fully appreciate HTTP 1.1 vhosting
> is much more appropriate in many situations, this does not however
> remove the need for large scale conventional virtual hosting alltogether.
>
> --
> GeoffB
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message