From db045dbbf60b53dbe013ef25554fd013baf88134 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 24 Nov 2004 01:04:44 +0000 Subject: Initial git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/configs/apache.conf | 31 +++++++++++++++++++++++++++++++ railties/configs/database.yml | 20 ++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100755 railties/configs/apache.conf create mode 100644 railties/configs/database.yml (limited to 'railties/configs') diff --git a/railties/configs/apache.conf b/railties/configs/apache.conf new file mode 100755 index 0000000000..feb2e32c4e --- /dev/null +++ b/railties/configs/apache.conf @@ -0,0 +1,31 @@ +# General Apache options +AddHandler fastcgi-script .fcgi +AddHandler cgi-script .cgi +Options +FollowSymLinks +ExecCGI +   +# Make sure that mod_ruby.c has been added and loaded as a module with Apache +RewriteEngine On +  +# Change extension from .cgi to .fcgi to switch to FCGI and to .rb to switch to mod_ruby +RewriteBase /dispatch.cgi +  +RewriteRule ^dispatch.servlet$ / [R] +  +# Enable this rewrite rule to point to the controller/action that should serve root. +# RewriteRule ^$ /controller/action +  +# Add missing slash +RewriteRule ^([-_a-zA-Z0-9]+)$ /$1/ [R] +  +# Default rewriting rules. +RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([0-9]+)$ ?controller=$1&action=$2&id=$3 [QSA,L] +RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ ?controller=$1&action=$2 [QSA,L] +RewriteRule ^([-_a-zA-Z0-9]+)/$ ?controller=$1&action=index [QSA,L] +  +RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([0-9]+)$ ?module=$1&controller=$2&action=$3&id=$4 [QSA,L] +RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ ?module=$1&controller=$2&action=$3 [QSA,L] +RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/$ ?module=$1&controller=$2&action=index [QSA,L] +  +# You can also point these error messages to a controller/action +ErrorDocument 500 /500.html +ErrorDocument 404 /404.html \ No newline at end of file diff --git a/railties/configs/database.yml b/railties/configs/database.yml new file mode 100644 index 0000000000..0f9a7eb20e --- /dev/null +++ b/railties/configs/database.yml @@ -0,0 +1,20 @@ +development: + adapter: mysql + database: rails_development + host: localhost + username: root + password: + +test: + adapter: mysql + database: rails_test + host: localhost + username: root + password: + +production: + adapter: mysql + database: rails_production + host: localhost + username: root + password: -- cgit v1.2.3