Actions
Bug #1684
closed404 when linking to a Rails app instantiated by $HTTP["url"]
ASK QUESTIONS IN Forums:
No
Description
When the configuration below is used in Rails 1.4.19, it initially brings up the Rails application, but gives a 404 when any URL of the form http://server/rails_app/controller etc is used. I was able to replicate this behavior with several applications of instances of 1.4.19.
However, upon reverting to 1.4.13, the below configuration worked perfectly.
$HTTP["url"] =~ "^/<app_name>" { server.document-root = "/var/rails/<app_name>/public/" alias.url = ( "/<app_name>/" => "/var/rails/<app_name>/public/" ) server.error-handler-404 = "dispatch.fcgi" server.indexfiles = ( "dispatch.fcgi") fastcgi.server = ( ".fcgi" => ( "localhost" => ( "socket" => "/var/rails/<app_name>/tmp/lighttpd-fcgi.socket", "bin-path" => "/var/rails/<app_name>/public/dispatch.fcgi", "bin-environment" => ( "RAILS_ENV" => "development" ), "min-procs" => 1, "max-procs" => 5, "idle-timeout" => 60, "allow-x-send-file" => "enable" ) ) ) }
-- august
Files
Updated by Anonymous over 16 years ago
The above post refers to a Rails 2 app in Lighttpd 1.4.19, I would assume.
Updated by stbuehler over 16 years ago
server.error-handler-404 = "/dispatch.fcgi" or "check-local" => "disable" in the fastcgi server could help.
Updated by stbuehler over 16 years ago
- Status changed from New to Fixed
- Resolution set to worksforme
The recommended way is to use mod_magnet/cleanurl for this (http://nordisch.org/cleanurl5.lua):
$HTTP["url"] =~ "^/<app_name>" { alias.url = ( "/<app_name>/" => "/var/rails/<app_name>/public/" ) magnet.attract-physical-path-to = ( "/etc/lighttpd/cleanurl-v5.lua" ) fastcgi.server = ( "dispatch.fcgi" => ( ... ) ) }
Updated by stbuehler about 16 years ago
- Status changed from Fixed to Missing Feedback
Actions
Also available in: Atom