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