Results 1 to 4 of 4
  1. #1

    how to configure subdomains

    hello there!!

    this is my first post ...

    I was just wondering how to configure subdomains on Apache webserver, on my home computer ...

    cheers!!

    -Noonshade

  2. #2
    You would want to use virtual hosts for what I am guessing you are wanting to do.

    First you'd create the correct A records in your DNS zonefile.
    ie. subdomain1.mydomain.com. IN A 192.168.1.1
    subdomain2.mydomain.com. IN A 192.168.1.1

    and so on.

    Then in Apache you'd do like so:

    NameVirtualHost *

    <VirtualHost *>
    ServerName subdomain1.mydomain.com
    DocumentRoot /var/www/subdomain1/htdocs
    </VirtualHost>

    <VirtualHost *>
    ServerName subdomain2.mydomain.com
    DocumentRoot /var/www/subdomain2/htdocs
    </VirtualHost>


    Obviously there's a lot more that can and should be in those <VirtualHost> sections, but you get the picture, right?
    http://www.bash-shell.net - webhosting geared towards personal websites and small businesses.
    http://domains.bash-shell.net

  3. #3
    yep ... I will try it out!!

    thanks, man!!

  4. #4
    no problem, glad to help. If you run into any trouble just let me know.
    http://www.bash-shell.net - webhosting geared towards personal websites and small businesses.
    http://domains.bash-shell.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •