DNS, subdomain & VirtualHost sheenanigans

This is a discussion on DNS, subdomain & VirtualHost sheenanigans within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi! Never being content to leave well-enough alone I decided I wanted a "real" & proper subdomain ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-24-2005
mquick
 
Posts: n/a
Default DNS, subdomain & VirtualHost sheenanigans

Hi!

Never being content to leave well-enough alone I decided I wanted
a "real" & proper subdomain setup for my site. Previously I had it
semi-proper in the sense that I had an A-NAME setup for the main domain,
but all subdomains where webaliases (via www.speednames.com).
Naturally, the change caused problems. I've research apache.org,
used Google (both on the web and Groups) but I'm quite at the
end of my wits.

Here's the setup and various outputs (edited for sake of... well,
paranoia).

"dig subdomain1.domain.com" gives me

; <<>> DiG 9.2.3 <<>> subdomain1.domain.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 55969
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;subdomain1.domain.com. IN A

;; ANSWER SECTION:
subdomain1.domain.com. 10907 IN CNAME 82.182.XXX.XXX.

;; AUTHORITY SECTION:
. 7307 IN SOA A.ROOT-SERVERS.NET.
NSTLD.VERISIGN-GRS.com. 2005012301 1800 900 604800 86400


BUT!!!!

"host subdomain1.domain.com" gives

Host subdomain1.domain.com not found: 3(NXDOMAIN)

which looks suspicious to me. I'm leaning towards a DNS problem, but
for the sake of completness, here's the relevant VirtualHost config
(running Apache 2.x, which has worked wonderful for alla other purposes):

NameVirtualHost 82.182.XXX.XXX:80

<VirtualHost 82.182.XXX.XXX:80>
ServerName www.domain.com
ServerAlias domain.com *.domain.com
ServerAdmin me@domain.com
DocumentRoot /var/www/html/
</VirtualHost>

<VirtualHost 82.182.XXX.XXX:80>
ServerName subdomain1.domain.com
ServerAlias subdomain1.domain.com
DocumentRoot /var/www/html/subdomain1/
ServerAdmin me@domain.com
ErrorLog logs/subdomain1.domain.com-error_log
CustomLog logs/subdomain1.domain.com-access_log common
</VirtualHost>

Any ideas and suggestions?
Thanks!
//mickeq
  #2 (permalink)  
Old 01-25-2005
David Efflandt
 
Posts: n/a
Default Re: DNS, subdomain & VirtualHost sheenanigans

On 24 Jan 2005 02:05:19 -0800, mquick <mickeq@gmail.com> wrote:
> Hi!
>
> Never being content to leave well-enough alone I decided I wanted
> a "real" & proper subdomain setup for my site. Previously I had it
> semi-proper in the sense that I had an A-NAME setup for the main domain,
> but all subdomains where webaliases (via www.speednames.com).
> Naturally, the change caused problems. I've research apache.org,
> used Google (both on the web and Groups) but I'm quite at the
> end of my wits.
>
> Here's the setup and various outputs (edited for sake of... well,
> paranoia).
>
> "dig subdomain1.domain.com" gives me
>
> ; <<>> DiG 9.2.3 <<>> subdomain1.domain.com
> ;; global options: printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 55969
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;subdomain1.domain.com. IN A
>
> ;; ANSWER SECTION:
> subdomain1.domain.com. 10907 IN CNAME 82.182.XXX.XXX.


Your DNS is misconfigured. A CNAME should point to a name and should show
up something like this (assuming a CNAME of your domain):

;; ANSWER SECTION:
subdomain1.domain.com. 10907 IN CNAME domain.com.
domain.com. 10907 IN A 82.182.XXX.XXX.

AUTHORITY SECTION should show authoritive nameservers for your domain.
What does whois show for your nameservers?


> ;; AUTHORITY SECTION:
> . 7307 IN SOA A.ROOT-SERVERS.NET.
> NSTLD.VERISIGN-GRS.com. 2005012301 1800 900 604800 86400
>
>
> BUT!!!!
>
> "host subdomain1.domain.com" gives
>
> Host subdomain1.domain.com not found: 3(NXDOMAIN)


Yes, so your vhost config does not matter until you fix DNS.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0