Virtual Hosts and DNS Configuration

This is a discussion on Virtual Hosts and DNS Configuration within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello, I have a simple question about subdomains. If a domain www.domain.tld points to a apache server with ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-10-2007
Martin Pöpping
 
Posts: n/a
Default Virtual Hosts and DNS Configuration

Hello,


I have a simple question about subdomains.

If a domain www.domain.tld points to a apache server with the IP
123.123.123.123 and I define virtual hosts in the httpd.conf for
a subdomain www.sub.domain.tld for a different document root, e.g.
/htdocs/www.sub/ instead of /htdocs/www/

Is it enough if I set up the domain domain.tld with the apache server IP
in the records of the DNS server?

Or do I also have to configure the subdomain www.sub.domain.tld in the
DNS server records?


Regards,

Martin



--
Error: No keyboard detected, press F1 to continue
  #2 (permalink)  
Old 07-10-2007
Mark Taylor
 
Posts: n/a
Default Re: Virtual Hosts and DNS Configuration

=?ISO-8859-15?Q?Martin_P=F6pping?= <martin_p@despammed.com> wrote in
news:f7047e$r01$1@newsreader2.netcologne.de:

> Hello,
>
>
> I have a simple question about subdomains.
>
> If a domain www.domain.tld points to a apache server with the IP
> 123.123.123.123 and I define virtual hosts in the httpd.conf for
> a subdomain www.sub.domain.tld for a different document root, e.g.
> /htdocs/www.sub/ instead of /htdocs/www/
>
> Is it enough if I set up the domain domain.tld with the apache server

IP
> in the records of the DNS server?
>
> Or do I also have to configure the subdomain www.sub.domain.tld in the
> DNS server records?
>
>
> Regards,
>
> Martin
>
>
>


If you want http://sub.domain.tld to resolve AND
http://www.sub.domain.tld to resolve to the same IP address then you MUST
have both a DNS entry and virtual host directives defining both.

For example:

<VirtualHost *:80>
ServerName sub.domaind.tld
ServerAlias www.sub.domain.tld
DocumentRoot /htdocs/www.sub <--Don't use a trailing slash
</VirtualHost>





----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  #3 (permalink)  
Old 07-10-2007
Kurt M. Weber
 
Posts: n/a
Default Re: Virtual Hosts and DNS Configuration

Martin Pöpping wrote:

> Hello,
>
>
> I have a simple question about subdomains.
>
> If a domain www.domain.tld points to a apache server with the IP
> 123.123.123.123 and I define virtual hosts in the httpd.conf for
> a subdomain www.sub.domain.tld for a different document root, e.g.
> /htdocs/www.sub/ instead of /htdocs/www/
>
> Is it enough if I set up the domain domain.tld with the apache server IP
> in the records of the DNS server?
>
> Or do I also have to configure the subdomain www.sub.domain.tld in the
> DNS server records?


Yes, everything has to exist in DNS; otherwise, people visiting your site
won't be able to get the IP address for it. This includes third- and
fourth-level domains. EVERYTHING has to be there.
--
Kurt M. Weber
<kmw@armory.com>
 


Thread Tools
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

vB 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 08:09 AM.


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