Automatically Host User Domains in Rails/Apache

Posted by Steve F on Stack Overflow See other posts from Stack Overflow or by Steve F
Published on 2010-06-06T09:11:08Z Indexed on 2010/06/14 5:52 UTC
Read the original article Hit count: 164

Filed under:
|
|
|
|

Hi, I'm currently developing a user facing web application that gives each new user their own subdomain on the site, which is fine (using subdomain_fu), but is there a way to let a user map their own domain to this subdomain?

I know how to do this manually through SSH-ing into the server and editing the Apache Vhosts file by hand, but is there a way to do this automatically so that a user simply enters their domain into a box on the site (obviously they'd have to change their own DNS elsewhere)?

I'm using Ruby 1.8 and Rails 2.3.3 on top of Apache.

Essentially letting;

http://user.application.com/article-1

be accessed from

http://userdomain.com/article-1

Thanks for any help!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby