Page 1 of 1

Subdomain linked to IP-less virtual account?

Posted: Wed Apr 30, 2008 10:18 pm
by bbf
Hi, this is the first time I play with subdomains via DNS so I'm a little confused. I've got a reseller account so I can create unlimited virtual accounts. I've only got 1 IP (but I can get more if that's what will get this to work).

I want:
domain.com -> domain.com virtual account
sub.domain.com -> completely separate virtual account on same IP

Is this possible?

I've added the A record to the DNS so that sub.domain.com points to the correct IP. Problem is that once it forwards to that IP, it doesn't find the virtual server. I've created a virtual server with the domain "sub.domain.com" but it doesn't see it (I get a "server not found" error).

What am I missing?

Re: Subdomain linked to IP-less virtual account?

Posted: Mon May 05, 2008 11:23 am
by pickle
Not sure what distro you're using, but I just set up a virtual host on my Fedora box using a virtual host.

There is a directive in httpd.conf to enable name based virtual hosting - make sure that's enabled.

Make a virtual host entry for the subdomain - it should be just like the main domain, just with a different server root & server name (and possibly server admin). httpd.conf should have an example in it.

Re: Subdomain linked to IP-less virtual account?

Posted: Sun May 11, 2008 9:57 pm
by Jenk
Example httpd.conf:

Code: Select all

NamedVirtualhost *:80
 
<VirtualHost *:80>
  ServerName http://www.example.com
  DocumentRoot /some/path/
</VirtualHost>
 
<VirtualHost *:80>
  ServerName http://subdomain.example2.com
  DocumentRoot /some/other/path/
</VirtualHost>