Rails on Apache2.0 + FastCgi

by

fcgi.cgi 放到\ruby\lib\ruby\1.8\
fcgi.so 放到\ruby\lib\ruby\1.8\i386-mswin32
mod_fastcgi.so 放到\Apache\modules\

httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so 取消#註解
LoadModule fastcgi_module modules/mod_fastcgi.so 加上這行

最後面加上:
Alias /myapp “d:/my_app/public” #改成資料夾路徑
<Directory d:/my_app/public/> #改成資料夾路徑
SetEnv RAILS_ENV production #production改成要用的模式
Options +FollowSymLinks +ExecCGI
AllowOverride all
Allow from all
Order allow,deny
</Directory>

專案/public/.htaccess
#RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] #for apach

發表迴響

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

連結到 %s


Follow

Get every new post delivered to your Inbox.