Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

one rails app, multiple domains (via alias domains)

Short version:
Is there any problem with serving a rails app from multiple domain names by simply creating an Alias Server and adding another $HTTP["host"] entry to your rails/lighttpd conf file (in ~/etc/lighttpd/vhosts.d/APPNAME.conf)?

Long version:
Here's the deal:
on the default virtual server created when you purchase a shared webhosting plan (USERNAME.textdrive.com) I've got a rails app installed and running off of fcgi.

Here's the .conf file for my particular rails app that gets included into the main lighttpd.conf file:

$HTTP["host"] =~ "(www\.)?(hatepad|sexymsg)\.(com|net)" {
  server.document-root        = base + "/domains/sexymsg.com/web/public/"
  server.error-handler-404 = "/dispatch.fcgi"
  fastcgi.server = (
        ".fcgi" => ( "localhost" => ( "socket" => base + "/var/run/sexymsg-0.socket" ) )
        )
}



After that, simply kill and restart the lighttpd process
kill -9 <lighttpd PID>
. ~/etc/rc.d/lighttpd.sh start
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed