[H-GEN] Apache & DNS
Andrew Pullin
andrew at hotspurbgc.com.au
Wed Oct 2 15:16:35 EDT 2002
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
Hi All,
I am having a problem getting a website working on a
server. I have RTFMed, and this has shed no light on the
problem and since this is the first time I have tried to set
up Apache, I need a little help. Basically the problem goes
like this:
I have set up an IP alias on my system and given it the
IP address I want to use for this web site (ie. my server is
203.myIP.193 on eth0:0, and the alias is 203.myIP.250 on
eth0:1). These are correct, visible and pingable etc.
I have set up DNS with my name servers for this IP
address and delegated the new domain and it is visible on
the net (ie www.mydomain and www.mynewdomain are visible
using DNS diagnostic tools Telstra provide with their DNS
services).
I have a series of web pages set up and they are live on the
net (ie I can get people outside my network to see them).
This is where the problem starts.
If I type in www.mydomain I get:
Bad Gateway
The following error occurred:
A DNS lookup error occurred. The host was not found.
This was working before I started this project.
If I type in www.mynewdomain I get:
Bad Gateway
The following error occurred:
A DNS lookup error occurred. The host was not found.
This is what I want to get working.
If I type in http://203.myIP.193 I get the index page for my
site www.mydomain
If I type in http://203.myIP.250 I get the index page for my
site www.mydomain
But here is another weird part -
The new web site hangs off the default html directory (which
is /var/www/html/) in a sub-directory that is visible by
typing in http://203.myIP.193/subdir/index.html (as you
would expect).
If I type in http://203.myIP.250/index.html I get the index
page for my site www.mynewdomain , which is in
/var/www/html/subdir/index.html.
Here are the two things that are puzzling me:
1.Why does Apache think DNS isn't working when I can get it
to work manually using the normal tools (ping, nslookup,
whois)? BTW my mail and everything else on the server isn't
broken.
2. Why does http://203.myIP.250 get the index page of the
default html directory just like http://203.myIP.193 (my
server and this is the behaviour I would expect) but if I
type in http://203.myIP.250/index.html gets the index page
to the new website, which is hanging off the default html
directory in a sub-directory? Logically these two pages are
the same since the default html file is
/var/www/html/index.html.
O.K. here are a few diagnostic tidbits.
The server runs RH7.0 and Apache 1.3.13
The logs are a bit hard to interpret, but seem fine
(access_log and error_log and newaccess_log newerror_log)
httpd.conf
Has HostNameLookups On, but this doesn't seem to make any
difference if it is Off
Has two Virtual hosts set up
NameVirtualHost 203.myIP.193
NameVirtualHost 203.myIP.250
and
<VirtualHost 203.myIP.193>
ServerName www.mydomain
DocumentRoot /var/www/html/
</VirtualHost>
<VirtualHost 203.myIP.250>
DocumentRoot /var/www/html/subdir/
ServerName www.mynewdomain
ErrorLog logs/newerror_log
CustomLog logs/newaccess_log common
</VirtualHost>
What I want in the end to be able to do is type in
www.mydomain and get the index page for mydomain and type in
www.mynewdomain and get the index page for mynewdomain. This
has been annoying me for over a week now, and I am sure that
it is a simple problem to fix, but my limited experience
with Apache is probably blinding me to the answer. If anyone
could assist that would be most appreciated as I needed to
get this site working a couple of weeks ago and it still
isn't. Thanks in advance.
Cheers!
Andrew.
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list