[thelist] Local apache
Hassan Schroeder
hassan at webtuitive.com
Tue Jan 27 09:25:29 CST 2004
Jeroen Coumans wrote:
> Is it possible to configure Apache so that it translates absolute links
> to the respective document root? I've tried aliasing, but that only
> works for one website. I've also read about virtual hosts but that seems
> to require a DNS server
No. You want to use virtual hosts, and you don't need your own DNS.
Put the hostnames you want to use in your local hosts file (if *nix
it's /etc/hosts[1], if Win it's C:\WINNT\system32\drivers\etc\hosts
or similar). It's as simple as:
192.168.10.20 realhostname dev1 dev2 foo newclient
Then you can access all your test sites as http://dev1, http://dev2,
http://foo, http://newclient, etc.
I have a virtual host "docs" where my local copies of documentation
live, so I can just type `docs/Java` or `docs/HTML` into the location
bar...
[1] depending on your flavor of *nix, you may have an 'nsswitch.conf'
file that tells the system where to do name resolution. If you do,
edit appropriately.
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
More information about the thelist
mailing list