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?
Subdomain linked to IP-less virtual account?
Moderator: General Moderators
Re: Subdomain linked to IP-less virtual account?
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.
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: Subdomain linked to IP-less virtual account?
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>