Koozali.org: home of the SME Server

Serving multiple domains

adam blake

Serving multiple domains
« on: July 26, 2003, 08:20:56 AM »
Hi,

I have searched through the forums but have not found a specific answer to my problem so I hope someone my be able to share their experiences on this topic.

Simply put I have two domain names, domain-a.com and domain-b.com, domain-a.com is the primary domain and the one configured as ServerName in the httpd.conf file. The second domain has been setup as a virtual domain which points to an i-bay.

The DNS record for both domains points to a hosting service who forward them to my single static IP.

My problem is this, the first domain is fine, visitors to the first domain see www.domain-a.com in their browser address bar. However visitors to the second domain do not see www.domain-b.com in their address bar, rather they see www.domain-a.com/ibayname.

My question is how do I change this so the second domain appears in the address bar. I have been reading the Apache documentation on IP and Name Based Virtual Hosts but wanted to first see if anyone else using SME (I am on 5.6) had experienced this issue.

Cheers,

adam

Kelvin

Re: Serving multiple domains
« Reply #1 on: July 26, 2003, 08:45:55 AM »
Hi Adam,

I have a couple of domains on my SME server as well but do not have your problem. Nothing special was done at my SME end. I suspect your problem might lie with the way your DNS record is setup or the way the redirection from the external host is being done.

The DNS records for each of my domains simply lists my IP address for www.eachdomainname.com. Everything else works out of the box.

Kelvin

adam blake

Re: Serving multiple domains
« Reply #2 on: July 28, 2003, 09:03:53 AM »
Hi Kelvin,

You are right, it should work by default. It looks a like it was a combination of problems but one major problem was that in the iBay I had set up for the virtual domain I had a directory by the name of /html/common which contained common code relevant to every html page. However common is an alias SME server sets up for the primary (and virtual domain it looks like) in the httpd.conf file so it should not be used as a directory name. That fixed and a few other smaller issues and most seems to be working fine. Though I have a new problem, but that is another thread....

cheers,

adam