There are dozens of sites and forums trying to explain the above; none of which, however, addresses the issue.
I have one "main" domain (working as DNS, etc.) parked to /var/www. Other are parked to /home/domains/*. I will try to explain what I did to create a subdomain for the "main" domain, and I'd be much appreciated if anyone could help me on this. I will call the domain just domain.com, and the subdomain a test.
FIRST STEP
As default, there was already virtual server (Apache):
Handles the name-based server on address *.
Server Name Automatic
Document Root /var/www
There were none "Alternate virtual server names" under "Networking and Addresses", so I wasn't worry that this virtual server would conflict with the new one. However, there might be problem with
Handles the name-based server on address *., but I don't know how to fix that...
I created a new virtual host as follows:
Document root: /var/www/test
Server name: test.domain.com
Everything else left as default, except I added:
*.test.domain.com
under "Alternate virtual server names" under "Networking and Addresses".
Config saved, and Apache restarted just to make sure it would work.
SECOND STEP
In the BIND DNS Server, I went to existing master zone for domain.com. I added a new A record:
test.domain.com. A Default 12.3.456.789
Again, BIND saved and restarted.
Where did I make a mistake? [
domain.com...] obviously works, but [
test.domain.com...] doesn't. Is it because of the
Handles the name-based server on address *.?
Many thanks.