[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] multiple domains to 1 virtual site



At 10:56 AM 2/22/00 -0500, you wrote:
> I have setup the DNS server on our RaQ2 and have created the
> necessary information for our registered domains.
>
> 1. An "A" record for domain.co.za pointing to ip address
> 2. An "A" record for www.domain.co.za pointing to ip address
> 3. An "MX" record for mail
> 4. A Secondary record pointing to our ISP's DNS server
>
> What must I do to point multiple domains to a single virtual web site?

I think there may be an easier way to accomplish this other than creating "sites" for each individual domain name. Is your purpose to funnel traffic from multiple domain names to the same website (i.e., you have one main domain name as well as three domain names representing products and the all need to point to the main domain)?

If this is the case, then you can easily edit the httpd.conf file and add the additional domain names in the "ServerAlias" section. Make sure not to run over a line without adding another "ServerAlias" heading. This will work just fine. Remember to restart Apache after you have made your changes.

AFAIK, the only way to do this, is if the virtual site was on a separate IP.
Otherwise, a .cgi script as suggested here recently.
Save below as index.cgi:

#!/bin/sh
echo "Location: http://www.domain.com/";
echo ""

CHMOD 755 index.cgi

Then put a .htaccess file in that directory:

Options FollowSymLinks Includes ExecCGI
DirectoryIndex index.cgi
AddHandler cgi-script .cgi .pl

That script works for me here: http://www.tamiamitrail.com/