Ok, I've been trying to setup some virtual hosts for my domain.
Let's say I want to have:

I already have the following Virtual Hosts setup:

www.domain1.ca -> /var/www/htdocs/domain1/
www.domain2.ca -> /var/www/htdocs/domain2/

etc...

but how do I setup something like:

www.domain1.ca -> /var/www/htdocs/domain1/joe/

joe.domain1.ca?

We our hosting the boxes internally. Do I have to tell our Provider to setup come CNAMES or something like that to get this to work?

    joe.domain1.ca?
    We are hosting the boxes internally. Do I have to tell our Provider to setup come CNAMES or something like that to get this to work?

    Yes. The zone record needs the subdomain added and pointing to your webserver. If you get tired of asking for sub domains of a particular domain, ask them to make a wildcard doamin of *.domain1.ca.

    That is, if the zone file handler for your domains supports that heh. Depends on the software they use. I know for sure BIND9 supports it correctly, and so does DJBDNS. I've no experience with any others, and I would be skeptical of any windows-based dns server software, hehe chuckle.

    Then on apache's side, just read up on that link posted by jstarkey. Its really a simple thing, as a subdomain website is basically another virtualhost directive (not something under another virtualhost).

      And if your provider can't handle it, get one that can. I host my own site, and outsource the DNS. I use EasyDNS, which gives me a Web-based form for managing all my DNS entries.

        Another free (up to so many limit) DNS web based host is "zoneedit.com". Fairly good, simple, free for a few domains etc. (although a friend had like 9 domains under it and they never charged him).

          thanks for the info. I figured that the zone record needed to be updated to be able to have subdomains.

          Too bad my provider doesn't seem to think that you can use wildcards in the zone file. :mad:

          Looks like we are going to be switching providers. 😉

            Good idea 😃

            Claiming that DNS records cannot have wildcards is like claiming you don't know what you are doing and SHOULDN'T be a provider to begin with 😃

              Write a Reply...