Re: [SLUG] speaking of DNS - apache web server.

From: Ian C. Blenke (icblenke@nks.net)
Date: Wed Dec 04 2002 - 16:28:18 EST


On Wednesday 04 December 2002 16:08, Mike Manchester wrote:
> I have Apache running with two Virtual domains and a DNS server. What I
> would like to do is.
> From my internal network be able to go to the web sites using there
> domain name. ie.
> http://somename.internaldomain.com or
> http://othername.internaldomain.name

Are these only resolvable from behind your firewall? If the outside world
cannot resolve them, it's not going to work.

> So what I'm wondering is can you have two different zones in the DNS
> point to the same IP address? And if so when Apache receives the request
> from the browser will it go to the appreciate Virtual Domain?

Yes. That is known as named virtual hosting. It relies on the fact that newer
web browsers send the website they were trying to connect to in their initial
HTTP connection headers.

Yes. When apache receives a request in this way, it will use to the
appropriate Virtual host section to answer the request.

> Does this make sense? It doesn't to me :)

As long as those are real FQDN records that are resolvable from the outside,
and both point to the same IP address (via A records, or CNAMEs to the same A
record), this is possible.

> Anyway both domains have a domain named assigned to them and I can
> access the domains from outside my network from a machine not on my side
> of the router. I can get to one of them using the host name ie.
> http://tango.somename.internaldomain.com (tango being the host name)
> from my side of the router as it's defined in the DNS as a zone.

If you want to make multiple internal boxes HTTP visible behind your public
facing box, you will need to configure an "HTTP accelerator", aka a "reverse
proxy". I use squid on my firewall to redirect hits to my home boxes for this
very reason. This is a bit more involved than simply hosting multiple named
virtual websites on a single webserver.

> What the goal of all this is. Is to be able to test each of the Virtual
> Domains from inside my network. As it stands now I can only get to the
> one in DNS.

Both domains will need valid DNS records resolvable from whatever clients need
to access them. Be it from within your network, of from the outside world.

-- 
- Ian C. Blenke <icblenke@nks.net>

(This message bound by the following: http://www.nks.net/email_disclaimer.html)



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:34:27 EDT