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

link|improve this question
feedback

2 Answers

If you configure Apache to serve requests for an IP, all requests to that IP will serve the same content. The domains will be irrelevant to Apache.

You would use VirtualHost if you wanted to point different domains to different content on the same IP.

link|improve this answer
feedback

Yes, you want Apache name-based virtual hosting, and there are many references available to help you get it set up. You can set up virtual hosts for each domain name you want to host, on the same IP address, with different configurations for each domain. You can also set up a default which will be used for domain names that don't have specific virtual hosts defined.

One word of warning, though. If you're using SSL, then name-based virtual hosts don't work, and you'll need a different IP address for each SSL site.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.