views:

17

answers:

2

First of all, granted the question is not very descriptive - quite hard to summarise what I mean in the title.

Let me elaborate. On uservoice.com they allow users to have domain aliasing.

For example, these sites use domain aliasing:

  1. http://feedback.bit.ly
  2. http://feedback.topofblogs.com
  3. http://feedback.neutex.net

None of them are hosting the uservoice platform independently.

So my question is, how do you think they're doing the user aliasing?

Do you think uservoice just have a lot of server aliases in the apache config or?

I'm very curious. I hope this question made sense.

Have a good day.

A: 

It depends what web server they're using. In order to do virtual hosting, which is what this is, you have to use HTTP 1.1, which sends the name of the server that the browser is requesting in the Host: header. So if the user requests http://www.foo.com/path/to/something then the request looks like:

GET /path/to/something HTTP/1.1
Host: www.foo.com

The web server can then look at "Host" to see how to handle the request.

Willis Blackburn
A: 

From the Apache docs on Name-based Virtual Hosts:

...the first listed virtual host is the default virtual host.

Each of their hosted sites probably has set up a cname in their DNS configuration to point to a uservoice server. Uservoice probably just uses a default virtual host to handle them all. I doubt they add a new virtual host entry or server alias every time they add a new client. That requires an Apache restart.

EDIT: A quick HTTP HEAD request of one of the sites you listed shows me they are using nginx, and not Apache. Nginx probably has similar configuration capabilities as Apache. I've never used it personally.

Asaph
Ah, how very interesting. Thank you for yours and Willis Blackburns's quick response.So let me see if i've got this right. On uservoice.com's server setup they have their default vhost.On feedback.example.com they have a CNAME record which points to uservoice's server. That would make perfect sense.Then how do you think uservoice matches the host to the correct environment. i.e. to make sure example1s dashboard is loaded instead of example2s. Database lookup based on the URL and then deploy as necessary? Interesting.
Jamie
@Jamie: It's almost certainly a database driven dynamic web site. The have some code that looks at the hostname that was sent in the request and then look up the appropriate data in a database and serve the page content dynamically.
Asaph