Posted by
stoyan on 31-Mar-2006
Lighttpd after version 1.4.9 requires the full path in the “bin-path” part of the lighttpd.conf file. Also from version 1.4.10 you will have CWD in your config files:
"bin-path" => CWD + "/public/dispatch.fcgi"
So if you have old lighttpd (<=1.4.8) and old rails applications (<=1.1.0) you can have a problems (with existing or just created applications):
- upgrading only the lighttpd, but not the rails (solution: convert relative paths to the absolute ones)
- upgrading only the rails, but not the lighttpd (CWD keyword support is missing in the old lighty versions, solution: remove CMD+ part from the path).
The best solution is maybe:
- convert all paths to absolute ones for the existing applications
- upgrade lighttpd to the latest version (1.4.11 in the moment)
- “freeze” the existing applications (put in /vendor/rails/ the correct rails version files)
- upgrade the rails (no need to do anything when generate new projects)
Posted by
stoyan on 06-Dec-2005
In the latest lighttpd-1.4.8 release, they removed the debian/ support (from the changelog):
removed debian/ dir from source package on request by packager
Sad
For me i solved the problem with copying the directory from the old 1.4.7 release and fixing the changelog file. If you need better support, use bougyman’s repository. In your debian or ubuntu /etc/apt/sources.list add:
deb http://debian.bougyman.com/ unstable main
Bougyman is a very interesting person. He is working for some US goverment organization and supporting a huge Ruby On Rails system (something like a paperless office) – PostgreSQL, linux virtual server powered FastCGI listeners etc. I learned a lot from him about using RoR in production environments. Thanks. Recently I found his typo blog – All-Purpose Log for Rubyists , full with useful information. Just to mention:
Posted by
stoyan on 24-Nov-2005
From the Lighttpd blog
:
lighttpd 1.4.8 was just released and next to a pile of bugfixes we added a new option to fastcgi.server to allow a simple setup of multiple rails app in one virtual host…the new option strip-request-uri removes parts of the request-uri before they are sent to the backend:
$HTTP["url"] =~ "^/app1/" {
server.document-root = "/home/rails/app1/public/"
alias.url = ( "/app1/" => "/home/rails/app1/public/" )
server.error-handler-404 = "/app1/dispatch.fcgi"
fastcgi.server = ( "/app1/dispatch.fcgi" =>
(( "socket" => "/tmp/app1.socket1",
"bin-path" => "/home/rails/app1/public/dispatch.fcgi",
"strip-request-uri" => "/app1/"
)))
}
Maybe you can have the same effect with adding to config/environment.rb the line:
ActionController::AbstractRequest.relative_url_root = "/app1"
In case of lighttpd, runing on high port, behign an apache proxy (similar to TextDrive), just add to apache.conf:
ProxyPass /app1 http://app1.example.net:8080
ProxyPassReverse /app1 http://app1.example.net:8080