Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

Post by Pete » Wed, 11 Dec 2002 00:30:49



Hi,

I've been trying to setup multipul virtual host names for one IP on RH
7.

For some reason the virtual host i have created doesn't seem to work.
When I use the DIG function to get some more info about the domain a
message comes back saying 'connection timed out' 127.0.0.1

I'm not sure if this has anything to do with my DNS settings.  I have
two computers, one being the linux machine, and the other running
windows.  The windows computer uses the linux terminal as a DNS server
which appears to work okay.  I can type in the domain of the linux
machine and be forwarded successfully to the test page.

I have one network card installed in the Linux system, identified as
eth0 using IP 192.168.0.2.

The hosts file containes the following (Linux terminal):

127.0.0.1    bart.simpson.com   localhost
192.168.0.2  localhost    simpson.com

The named.conf has entries for the 0.0.127.inaddr-arpa and
0.168.192.inaddr-arpa and simpsons.com zone (system domain).  Using
nslookup on things such as bart.simpson.com and localhost and
192.168.0.2 resolve correctly.

The feedback i get from httpd -S is that the default server is
192.168.0.2:80 journey.com (this is a virtual host entry in the
httpd.conf).

However i can't ping, nslookup or dig the virtual domain journey.com,
i simply get 'connection timed out' using dig or non-existent
host/domain using nslookup.  Neither of the systems are connected to
the internet, they are simply being used for testing purposes.  The
end result being that the linux terminal will be a DNS and caching
name server for the LAN.

Any suggestions on what i have configured wrong/forgotten to do.  I'm
very new to linux. so i'm not sure which files need editing, or what
entries should be made into what files etc.

Thanks in advance.

Pete

 
 
 

Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

Post by Paul Lutu » Wed, 11 Dec 2002 02:33:53



> Hi,

> I've been trying to setup multipul virtual host names for one IP on RH
> 7.

> For some reason the virtual host i have created doesn't seem to work.
> When I use the DIG function to get some more info about the domain a
> message comes back saying 'connection timed out' 127.0.0.1

Make sure this line appears in your /etc/hosts file:

127.0.0.1       localhost.localdomain localhost

/ ...

Quote:> I have one network card installed in the Linux system, identified as
> eth0 using IP 192.168.0.2.

> The hosts file containes the following (Linux terminal):

> 127.0.0.1    bart.simpson.com   localhost

Bingo. Never do this. Yu must not change this line in any way.

Quote:> 192.168.0.2  localhost    simpson.com

Even worse. You have managed to mix up the two lines. They should be:

127.0.0.1       localhost.localdomain localhost

192.168.0.2     bart.simpson.com bart.simpson

Moral? Network configuration is not an exercise in creative writing. You
can't just type anything, anywhere, and expect it all to work.

--
Paul Lutus
www.arachnoid.com

 
 
 

Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

Post by Greg DeFreita » Wed, 11 Dec 2002 04:41:13




>>Hi,

>>I've been trying to setup multipul virtual host names for one IP on RH
>>7.

>>For some reason the virtual host i have created doesn't seem to work.
>>When I use the DIG function to get some more info about the domain a
>>message comes back saying 'connection timed out' 127.0.0.1

> Make sure this line appears in your /etc/hosts file:

> 127.0.0.1  localhost.localdomain localhost

127.0.0.1
localhost
192.168.0.2
bart.simpson.com bart

- Show quoted text -

Quote:

> / ...

>>I have one network card installed in the Linux system, identified as
>>eth0 using IP 192.168.0.2.

>>The hosts file containes the following (Linux terminal):

>>127.0.0.1    bart.simpson.com   localhost

> Bingo. Never do this. Yu must not change this line in any way.

>>192.168.0.2  localhost    simpson.com

> Even worse. You have managed to mix up the two lines. They should be:

> 127.0.0.1  localhost.localdomain localhost

> 192.168.0.2        bart.simpson.com bart.simpson

I repeat:
127.0.0.1
localhost
192.168.0.2
bart.simpson.com bart

I believe I win ;-)

- Show quoted text -

Quote:

> Moral? Network configuration is not an exercise in creative writing. You
> can't just type anything, anywhere, and expect it all to work.

 
 
 

Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

Post by Paul Lutu » Thu, 12 Dec 2002 03:57:28


/ ...

Quote:>> Make sure this line appears in your /etc/hosts file:

>> 127.0.0.1      localhost.localdomain localhost

> 127.0.0.1
> localhost
> 192.168.0.2
> bart.simpson.com bart

Your example must look like this:

127.0.0.1 localhost.localdomain localhost
192.168.0.2 bart.simpson.com bart

Single lines, exactly as shown.

/ ...

Quote:>> Even worse. You have managed to mix up the two lines. They should be:

>> 127.0.0.1      localhost.localdomain localhost

>> 192.168.0.2    bart.simpson.com bart.simpson
> I repeat:
> 127.0.0.1
> localhost
> 192.168.0.2
> bart.simpson.com bart

You repeat an error.

Quote:

> I believe I win ;-)

I believe you can't read.

--
Paul Lutus
http://www.arachnoid.com

 
 
 

Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

Post by Greg DeFreita » Thu, 12 Dec 2002 09:33:16




> / ...

>>>Make sure this line appears in your /etc/hosts file:

>>>127.0.0.1   localhost.localdomain localhost

>>127.0.0.1
>>localhost
>>192.168.0.2
>>bart.simpson.com bart

> Your example must look like this:

> 127.0.0.1 localhost.localdomain localhost
> 192.168.0.2 bart.simpson.com bart

> Single lines, exactly as shown.

> / ...

>>>Even worse. You have managed to mix up the two lines. They should be:

>>>127.0.0.1   localhost.localdomain localhost

>>>192.168.0.2         bart.simpson.com bart.simpson

>>I repeat:
>>127.0.0.1
>>localhost
>>192.168.0.2
>>bart.simpson.com bart

> You repeat an error.

>>I believe I win ;-)

> I believe you can't read.

I can read  RFC's, here's a little snippet from #1912:
...
    There has been some extensive discussion about whether or not to
    append the local domain to it.  The conclusion is that "localhost."
    would be the best solution.  The reasons given include:

       "localhost" by itself is used and expected to work in some
       systems.

       Translating 127.0.0.1 into "localhost.dom.ain" can cause some
       software to connect back to the loopback interface when it didn't
       want to because "localhost" is not equal to "localhost.dom.ain".
...
I hereby swear not to post to this thread again, (I've met people like
you before, Paul. ;-)

 
 
 

Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

Post by Paul Lutu » Thu, 12 Dec 2002 10:47:27


/ ...

Quote:> I hereby swear not to post to this thread again, (I've met people like
> you before, Paul. ;-)

Whatever. Most current distributions have this default content in
/etc/hosts:

**********************************************

# Do not remove the following line, or various programs
# that require network functionality will fail.

127.0.0.1       localhost.localdomain localhost

**********************************************

The reason? Some mail servers want a domain as well as a name, and they
are often set to run from the first boot. If there is no network address
or name, they rely on loopback. If there is no domain, some hang or take
an unconscionable amount of time to give up trying to resolve something
meaningful.

--
Paul Lutus
http://www.arachnoid.com

 
 
 

Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

Post by James D. Melto » Thu, 12 Dec 2002 15:31:45


In addition to the other gentlemens' comments, you will also need to add the
appropriate records for your 'virtual' hosts to your zone files if this
machine is providing DNS services to your windows machine....
Regards,
James

Quote:> Hi,

> I've been trying to setup multipul virtual host names for one IP on RH
> 7.

> For some reason the virtual host i have created doesn't seem to work.
> When I use the DIG function to get some more info about the domain a
> message comes back saying 'connection timed out' 127.0.0.1

> I'm not sure if this has anything to do with my DNS settings.  I have
> two computers, one being the linux machine, and the other running
> windows.  The windows computer uses the linux terminal as a DNS server
> which appears to work okay.  I can type in the domain of the linux
> machine and be forwarded successfully to the test page.

> I have one network card installed in the Linux system, identified as
> eth0 using IP 192.168.0.2.

> The hosts file containes the following (Linux terminal):

> 127.0.0.1    bart.simpson.com   localhost
> 192.168.0.2  localhost    simpson.com

> The named.conf has entries for the 0.0.127.inaddr-arpa and
> 0.168.192.inaddr-arpa and simpsons.com zone (system domain).  Using
> nslookup on things such as bart.simpson.com and localhost and
> 192.168.0.2 resolve correctly.

> The feedback i get from httpd -S is that the default server is
> 192.168.0.2:80 journey.com (this is a virtual host entry in the
> httpd.conf).

> However i can't ping, nslookup or dig the virtual domain journey.com,
> i simply get 'connection timed out' using dig or non-existent
> host/domain using nslookup.  Neither of the systems are connected to
> the internet, they are simply being used for testing purposes.  The
> end result being that the linux terminal will be a DNS and caching
> name server for the LAN.

> Any suggestions on what i have configured wrong/forgotten to do.  I'm
> very new to linux. so i'm not sure which files need editing, or what
> entries should be made into what files etc.

> Thanks in advance.

> Pete

 
 
 

Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

Post by Pete » Wed, 18 Dec 2002 20:36:02


Thanks guys got it sorted :)

Pete

 
 
 

1. Mixing Apache Name Based Virtual Hosts and SSL Virtual Host

This query refers to Apache 1.3.24 and mod_ssl 2.8.8-1.3.24, on
Solaris 8.

I am running a bunch of name-based virtual hosts on port 80 using a
wildcard in the NameVirtualHosts directive. I am load balancing across
a lot of real servers and want to have the same config files on each
server, so I don't want to have to specify the server IP address in
httpd.conf.

I now want to add an SSL virtual host on port 443. I know that I can't
have name-based virtual hosts with SSL, and I don't need them -- I
just need the one. But if I try to add a virtual host configuration
like:

<VirtualHost _default_:443>
    [SSL configuration stuff]
</VirtualHost>

I get the error message "mixing * ports and non-* ports with a
NameVirtualHost address is not supported, proceeding with undefined
results".

Is there any other way I can have several name-based virtual hosts on
port 80, a single SSL virtual host on port 443 and not have to put the
server IP address in httpd.conf?

2. linux=geek

3. Name bases Virtual hosts, SSL and one ordering page for multiple domains

4. Can't get Perl to execute with apache

5. : How to prevent one named virtual host from "seeing" another virtual hosts files ?

6. Network security, DHCP, and Linux

7. Name-based vs IP based virtual hosts

8. RPMs for KDE 1.1 - When? Where?

9. Mixing IP-based and name-based virtual hosts?

10. Can IP-based and Name-Based Virtual Hosting coexist

11. Setting up IP-based and Name-based virtual hosting side by side...

12. name based vi IP based virtual hosts

13. Help: setup name-based or port-based virtual web host.