one rails app, multiple domains (via alias domains)
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