Results 1 to 2 of 2
  1. #1

    Question setting up virtual server with second domain name

    i'm running apache on windows xp. it's running fine, got one domain running with the A record from a free DNS service. the problem is that my other domain can't be set up as an A record cuz the free DNS service will only allow an IP address to be entered. so i set it up to forward to another directory.

    how do i set up the second domain name to go to the other directory without having it forward there by the DNS service? i'm under the impression that i can set up a virtual server in apache somehow, correct?

    thanks in advance!

  2. #2
    Hey there,

    You have to set up both domains to share single IP address. With Apache, you need to use Virtual Hosts. Let's assume that you have domain names a.com and b.com and you already set up both of them to point to the same IP address at DNS service. The following must be defined in apache config:

    Port 80
    ServerName server.domain.tld
    NameVirtualHost *:80
    <VirtualHost *:80>
    DocumentRoot d:/www/a.com
    ServerName www.a.com
    ...
    </VirtualHost>

    <VirtualHost *:80>
    DocumentRoot d:/www/b.com
    ServerName www.b.com
    ...
    </VirtualHost>

    Googling for VirtualHost may yield more samples and howtos. Good Luck!

    With regards, Mikka

Similar Threads

  1. Need Help : Godaddy Virtual Server php.ini setting through SSH?
    By chessming in forum Hosting Security and Technology
    Replies: 7
    Last Post: 08-20-2006, 11:24 PM
  2. Setting Domain Name Server
    By SQplus in forum Domain Names
    Replies: 3
    Last Post: 09-11-2005, 07:28 AM
  3. setting up a master domain server
    By tekgear in forum Dedicated Server
    Replies: 2
    Last Post: 07-06-2003, 09:57 PM
  4. setting up virtual DNS
    By submitasite in forum Hosting Security and Technology
    Replies: 0
    Last Post: 04-16-2003, 12:23 AM
  5. whats involved in setting up a virtual dedicated server
    By Sainthax in forum Dedicated Server
    Replies: 0
    Last Post: 03-07-2002, 07:05 PM

Posting Permissions

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