Apache httpd.conf handle multiple domains to run the same application

Posted by John Stewart on Server Fault See other posts from Server Fault or by John Stewart
Published on 2010-09-14T18:04:02Z Indexed on 2012/06/28 3:18 UTC
Read the original article Hit count: 494

So what we are looking for is the ability to do the following:

  • We have an application that can load certain settings based on the domain that it is being accessed from. So if you come from xyz.com we show a different logo and if you come from abc.com we show a different logo. The code is the same, running from same server just detects the domain on the run

  • Now we want to get a dedicated server (any suggestions?) that will enable us to point all the doamins that we want to this server (we change the DNS for the domains to that of our server) and then when the user goes to a certain domain they run the same application.

Now as far as I can understand we will need to create a "VirtualHost" in apache to handle this. Can we create a wildcard virtualhost that catches all the domains?

I am not an expert with Apache at all. So please forgive if this comes out to be a silly question. Any detailed help would be great.

Thanks

© Server Fault or respective owner

Related posts about apache2

Related posts about hosting