How To

How to Set Up Multiple Domains on a Web Server

By eHow Computers Editor
Rate: (1 Ratings)

If you have a home computer that functions as a Web server, you may want to set up multiple domains. This may sound complicated, but you can do it with a little bit of knowledge and some software. It should only take a few minutes to set up your multiple domains.

Difficulty: Moderately Challenging
Instructions

Things You'll Need:

  • Computer with Internet access
  • Operating software and web server software
  • Web server
  • Router
  1. Step 1

    Shut down any software firewalls you have running on your Web server. Install an HTTP server program such as Apache HTTP Server.

  2. Step 2

    Create a directory on your Web server. The directory should be a sub-folder in the Web server directories folder. Usually the directories folder is called "htdocs."

  3. Step 3

    Edit the virtual hosts section of the configuration directory of your Web server. If you have Apache version 1, then edit the "vhosts" section of the "apache.conf" file.

  4. Step 4

    Add a new virtual host by entering the following commands in the "vhosts" section:

    ServerName DOMAIN NAME
    DocumentRoot FULL_PATH_TO_DIRECTORY

    Save your changes.

  5. Step 5

    Restart Apache and edit the ".conf" file. Add and entry for each new domain you wish to set up. Here is an example:
    zone "DOMAIN" IN {
    type master;
    file "LOCATION_OF_DB_FILE";
    allow-transfer { IP_ADDRESS; };
    };

  6. Step 6

    Create a db file for each new domain. One easy way to do this is to copy other db files and add a new domain, then save it as a new file.

  7. Step 7

    Reload your DNS and test the new domain in a Web browser. If everything was done correctly, your new domain should be working work.

Tips & Warnings
  • Make back up copies of your Apache files—such as your configuration directory—before changing them.
  • As with any Web server that operates 24 hours a day, make sure you have a hardware firewall on your router at all times.

Post a Comment

Post a Comment

Have you done this? Click here to let us know.

I Did This

Related Ads

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.

eHow Computers
eHow_eHow Technology and Electronics