LighttpdOnRails » History » Revision 10
Revision 9 (stbuehler, 2009-04-03 21:22) → Revision 10/17 (stbuehler, 2009-04-03 21:24)
h1. Ruby on Rails with Lighttpd A document is available at http://old.bougyman.com/RailsonDebian.html which contains step by step instructions on setting rails up with lighttpd. A more abbreviated version (different author, i believe jawong) is available at http://wiki.rubyonrails.com/rails/show/Lighttpd . May you have happy Railing. h2. Lighttpd 1.5 Get "cleanurl.lua":http://nordisch.org./cleanurl.lua from http://nordisch.org./. <pre> $HTTP["host"] == "rails-app.example.org" { server.document-root = "/path/to/rails-application/public/" magnet.attract-physical-path-to = ( "/etc/lighttpd/cleanurl.lua" ) $HTTP["url"] == "/dispatch.fcgi" { proxy-core.backends = ( "unix:/var/run/lighttpd/rails-application.sock" ) proxy-core.protocol = "fastcgi" proxy-core.allow-x-sendfile = "enable" } } </pre> h2. Using RubyOnRails in a simple-vhost environment Let's say: For an easy setup you want to use "simple-vhost":http://www.lighttpd.net/documentation/simple-vhost.html but still want to separate the rails-installation: <pre> $HTTP["host"] == "ruby.example.org" { server.document-root = "/var/www/site/public/" fastcgi.server = ... } $HTTP["host"] != "ruby.example.org" { simple-vhost.server-root = "/var/www/servers/" simple-vhost.default-host = "www.example.org" simple-vhost.document-root = "pages" } </pre>