[thelist] multiple sites on localhost with Apache?
Hassan Schroeder
hassan at webtuitive.com
Wed Oct 27 12:14:34 CDT 2004
Stephen Rider wrote:
> If it were only one site, I would just throw the files on the hard drive
> and serve them up as 127.0.0.1, but I need to find a way to set it up so
> that if the browser looks for www.abc.com Apache will serve up the
> contents of /Sites/abc/ , and if www.123.com it will point to
> /Sites/123/ (obviously these are example addresses).
>
> Is there a way to do this? I'm sure it will involve Virtual Domains,
> which understand only vaguely, but won't I also have to set up a "fake"
> local DNS or somesuch to point the browser to the directories?
Just add them to /etc/hosts, like:
127.0.0.1 localhost www.abc.com www.123.com
:: and then set up your virtual hosts under Apache.
HTH,
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
More information about the thelist
mailing list