Chris@0
|
1 # General Apache options
|
Chris@0
|
2 <IfModule mod_fastcgi.c>
|
Chris@0
|
3 AddHandler fastcgi-script .fcgi
|
Chris@0
|
4 </IfModule>
|
Chris@0
|
5 <IfModule mod_fcgid.c>
|
Chris@0
|
6 AddHandler fcgid-script .fcgi
|
Chris@0
|
7 </IfModule>
|
Chris@0
|
8 <IfModule mod_cgi.c>
|
Chris@0
|
9 AddHandler cgi-script .cgi
|
Chris@0
|
10 </IfModule>
|
Chris@0
|
11 Options +FollowSymLinks +ExecCGI
|
Chris@0
|
12
|
Chris@0
|
13 # If you don't want Rails to look in certain directories,
|
Chris@0
|
14 # use the following rewrite rules so that Apache won't rewrite certain requests
|
Chris@0
|
15 #
|
Chris@0
|
16 # Example:
|
Chris@0
|
17 # RewriteCond %{REQUEST_URI} ^/notrails.*
|
Chris@0
|
18 # RewriteRule .* - [L]
|
Chris@0
|
19
|
Chris@0
|
20 # Redirect all requests not available on the filesystem to Rails
|
Chris@0
|
21 # By default the cgi dispatcher is used which is very slow
|
Chris@0
|
22 #
|
Chris@0
|
23 # For better performance replace the dispatcher with the fastcgi one
|
Chris@0
|
24 #
|
Chris@0
|
25 # Example:
|
Chris@0
|
26 # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
|
Chris@0
|
27 RewriteEngine On
|
Chris@0
|
28
|
Chris@0
|
29 # If your Rails application is accessed via an Alias directive,
|
Chris@0
|
30 # then you MUST also set the RewriteBase in this htaccess file.
|
Chris@0
|
31 #
|
Chris@0
|
32 # Example:
|
Chris@0
|
33 # Alias /myrailsapp /path/to/myrailsapp/public
|
Chris@0
|
34 # RewriteBase /myrailsapp
|
Chris@0
|
35
|
Chris@0
|
36 RewriteRule ^$ index.html [QSA]
|
Chris@0
|
37 RewriteRule ^([^.]+)$ $1.html [QSA]
|
Chris@0
|
38 RewriteCond %{REQUEST_FILENAME} !-f
|
Chris@0
|
39 <IfModule mod_fastcgi.c>
|
Chris@0
|
40 RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
|
Chris@0
|
41 </IfModule>
|
Chris@0
|
42 <IfModule mod_fcgid.c>
|
Chris@0
|
43 RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
|
Chris@0
|
44 </IfModule>
|
Chris@0
|
45 <IfModule mod_cgi.c>
|
Chris@0
|
46 RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
|
Chris@0
|
47 </IfModule>
|
Chris@0
|
48
|
Chris@0
|
49 # In case Rails experiences terminal errors
|
Chris@0
|
50 # Instead of displaying this message you can supply a file here which will be rendered instead
|
Chris@0
|
51 #
|
Chris@0
|
52 # Example:
|
Chris@0
|
53 # ErrorDocument 500 /500.html
|
Chris@0
|
54
|
Chris@0
|
55 ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" |