From 824558816acb7b930624e3cbd4dae8e7413e12f4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 20 Feb 2005 23:51:06 +0000 Subject: Added lighttpd config example and changed apache.log to less discriminating server.log git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/README | 32 ++++++++++++++++++++-- railties/Rakefile | 2 +- .../generators/applications/app/app_generator.rb | 2 +- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/railties/README b/railties/README index 2c1c9a872d..cedb61ce21 100644 --- a/railties/README +++ b/railties/README @@ -49,7 +49,7 @@ link:files/vendor/actionpack/README.html. ServerName rails DocumentRoot /path/application/public/ - ErrorLog /path/application/log/apache.log + ErrorLog /path/application/log/server.log Options ExecCGI FollowSymLinks @@ -65,9 +65,37 @@ through CGI, so no Apache restart is necessary for changes. All other requests goes through FCGI (or mod_ruby) that requires restart to show changes. +== Example for lighttpd conf (with FastCGI) + +server.port = 8080 +server.bind = "127.0.0.1" +# server.event-handler = "freebsd-kqueue" # needed on OS X + +server.modules = ( "mod_rewrite", "mod_access", "mod_fastcgi" ) + +server.indexfiles = ( "index.html" ) +url.rewrite = ( "^([^.]+)$" => "$1.html" ) +server.error-handler-404 = "/dispatch.fcgi" # change to dispatch.cgi to run CGI + +server.document-root = "/path/application/public" +server.errorlog = "/path/application/log/server.log" + +fastcgi.server = ( ".fcgi" => + ( "localhost" => + ( + "min-procs" => 1, + "max-procs" => 5, + "socket" => "/tmp/application.fcgi.socket", + "bin-path" => "/path/application/public/dispatch.fcgi", + "bin-environment" => ( "RAILS_ENV" => "development" ) + ) + ) +) + + == Debugging Rails -Have "tail -f" commands running on both the apache.log, production.log, and +Have "tail -f" commands running on both the server.log, production.log, and test.log files. Rails will automatically display debugging and runtime information to these files. Debugging info will also be shown in the browser on requests from 127.0.0.1. diff --git a/railties/Rakefile b/railties/Rakefile index 0acb2909ba..cbe4a7e82a 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -19,7 +19,7 @@ APP_DIRS = %w( apis models controllers helpers views views/layouts ) PUBLIC_DIRS = %w( images javascripts stylesheets _doc ) TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/testing ) -LOG_FILES = %w( apache.log development.log test.log production.log ) +LOG_FILES = %w( server.log development.log test.log production.log ) HTML_FILES = %w( 404.html 500.html index.html ) BIN_FILES = %w( generate destroy breakpointer console server update ) diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index a8f1778f02..26fd582c88 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -71,7 +71,7 @@ class AppGenerator < Rails::Generator::Base m.file "doc/README_FOR_APP", "doc/README_FOR_APP" # Logs - %w(apache production development test).each { |file| + %w(server production development test).each { |file| m.file "configs/empty.log", "log/#{file}.log", :chmod => 0666 } end -- cgit v1.2.3