[svlug] Re: virtual domain names inside the LAN
drew at drewb.com
Wed Aug 28 00:59:41 PDT 2002
On Tue, Aug 27, 2002 at 03:36:51PM -0700, Daevid Vincent wrote:
> After re-reading this, I am still a bit confused. I get what your
> saying, I just don't get why it works like that.
> It seems to me that if people outside my LAN get routed to the right IP
> (22.214.171.124) and then Apache handles it from there, how come it isn't
> the case that when Lynx on my Linux box (192.168.0.254) makes the
> request, it goes out to the DNS server, doesn't it get returned the same
> IP 126.96.36.199 as everyone else, and therefore shouldn't it go to
> 188.8.131.52 and then Apache handles it again like any other request?
> How and/or Why is the internal request being sent to 192.168.0.1 instead
> of 184.108.40.206? I know I re-iterated what you said to some degree, but
> the key phrase I guess is this, when lynx goes to 220.127.116.11 why
> doesn't Apache handle it again like any other incoming request"
> And I looked at 'man hosts' and see:
> 127.0.0.1 localhost
> 192.168.1.10 foo.mydomain.org foo
> 192.168.1.13 bar.mydomain.org bar
> 18.104.22.168 master.debian.org master
> 22.214.171.124 www.opensource.org
> So should mine look like:
> 127.0.0.1 daevid localhost.localdomain localhost
> 192.168.0.254 www.marq.org ftp.marq.org marq.org marq
> 192.168.0.254 www.VRExhibits.com ftp.VRExhibits.com VRExhibits.com
> 192.168.0.254 www.frizbcd.com ftp.frizbcd.com frizbcd.com frizbcd
> Can I stack the same IP like that or does it have to be on one long
Why not try and find out. It's an instant change: once you edit and
save, the effect is immediate. You can always edit it back.
The answer, though, is yes, you can put them on several lines like so:
I do this on my workstation when I'm developing a site. So, if I'm
developing, say, agilent.jpager.com, I'd likely have in my /etc/hosts
NOW! In apache's httpd.conf file, I have to make sure I've set up the
virtual server section correctly:
# NOTE: I want my dev apache sites to come up when I'm working locally
# on my Laptop or other local boxes, so I can't use 127.0.0.1. I'll
# use my local 192.168.1.0 IP (though this has to match entries in the
# /etc/hosts file for all fake domains on all boxes trying to access
# this server.
# Don't need more for this dev-site.
. (other VirtualHosts)
> And do I need to have all four permutations of each domain (www. ftp.
> .com name)?
> Should the IP be 127.0.0.1 or 192.168.0.254 for all the virtual domains?
See above "NOTE"
+---------------------- T h e C o o p . n e t ----------------------+
| Drew Bertola Hosting - Colocation Tel: 408-738-8337 |
| TheCoop.net Programming - Administration Mob: 408-887-0426 |
| drew at thecoop.net Open Source Specialists http://thecoop.net |
More information about the svlug