Aliasing customer.mysite.com to customer.com possible?

I’m using DHH’s Account Location plugin to create the subdomains for the
users. If a user wants a unique domain name for their account (e.g.
customer.com), instead of the default customer.mysite.com, is that
possible?

Any ideas or resources on where to start?

On Dec 13, 2007, at 1:24 AM, Bob S. wrote:

I’m using DHH’s Account Location plugin to create the subdomains
for the
users. If a user wants a unique domain name for their account (e.g.
customer.com), instead of the default customer.mysite.com, is that
possible?

Someone (presumably your customer) would have to buy that domain
name, and someone would have to host the DNS records for it to point
that domain name to your server’s IP address. Your HTTP server’s
virtual host config would then have to allow for aliasing of the
customer’s domain to your application.

It is doable. I would ony know how to do it manually (for Apache),
and the HTTP server would have to be bounced each time you added an
alias. It’s not something I would want to offer as a feature for
everyone in a shared application as I don’t see an easy way to
automate it, but someone out there may have dealt with it.

Sounds like you’re set on the sub-domains, but in case anyone else
was wondering, here’s more info on subdomain how-to http://
www.railsdev.ws/blog/10/using-subdomains-in-rails-apps/


def gw
acts_as_n00b
writes_at(www.railsdev.ws)
end

Thanks for the great info, Greg! I had a hunch that automating it
wouldn’t be possible. I know Ning offers domain aliasing for their
users, and I’m assuming they manually do it for each customer (or have
the customer do it).

I just located Shopify’s domain aliasing process for GoDaddy users
(http://wiki.shopify.com/Godaddy). Pretty tedious!

On 13 Dec 2007, at 10:40, Greg W. wrote:

customer’s domain to your application.

It is doable. I would ony know how to do it manually (for Apache),
and the HTTP server would have to be bounced each time you added an
alias. It’s not something I would want to offer as a feature for
everyone in a shared application as I don’t see an easy way to
automate it, but someone out there may have dealt with it.

Greg is right here, there’s some manual configuration work involved
such as pointing the dns records and adding a ServerAlias directive
to Apache (the reload the apache configs). After that, u can use the
“account_domain” helper of the account location plugin to check
against that domain:

account_domain==“maindomain.com” ? Account.find_by_subdomain :
Account.find_by_domain

Best regards

Peter De Berdt

Peter De Berdt wrote:

On 13 Dec 2007, at 10:40, Greg W. wrote:

customer’s domain to your application.

It is doable. I would ony know how to do it manually (for Apache),
and the HTTP server would have to be bounced each time you added an
alias. It’s not something I would want to offer as a feature for
everyone in a shared application as I don’t see an easy way to
automate it, but someone out there may have dealt with it.

Greg is right here, there’s some manual configuration work involved
such as pointing the dns records and adding a ServerAlias directive
to Apache (the reload the apache configs). After that, u can use the
“account_domain” helper of the account location plugin to check
against that domain:

account_domain==“maindomain.com” ? Account.find_by_subdomain :
Account.find_by_domain

Best regards

Peter De Berdt

Great stuff, Peter. Thanks for the dns and apache tips – and,
especially that last one involving the account location plugin that’s
going to save me a lot of time figuring all of this out. Thanks a bunch!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs