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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
=?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 =---- |
|
|||
|
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 | |
|
|