好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

capistrano

capistrano

http://wiki.ocssolutions测试数据/Step-by-step_setup_using_Capistrano_2.0_and_Mongrel

http://tech.wangyaodi测试数据/2010/07/30/study-notes-passenger-capistrano-nginx-rails-2-3-4-ubuntu-9-04-10-steps/

http://gautamrege.wordpress测试数据/2009/11/10/capistrano-nginx-thin-deployment-on-linode/

http://tech.wangyaodi测试数据/2010/07/30/study-notes-passenger-capistrano-nginx-rails-2-3-4-ubuntu-9-04-10-steps/

http://jimneath.org/2008/05/10/using-capistrano-with-passenger-mod_rails/

apache+mongrel模式在sles上的注意事项 收藏

# 首先是RewriteRule要匹配,然后再执行RewriteCond测试,如果RewriteCond测试也通过的话,那么就执行RewriteRule中的替换。由于向来是RewriteCond在前,所以虽然RewriteRule执行在先,还是放到后面。

# Check for maintenance file and redirect all requests
#  ( this is for use with Capistrano's disable_web task )
  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f :-f表示前面的路径存在,并且是一个普通的文件
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html :表示请求的文件名不是maintenance.html
  RewriteRule ^.*$ /system/maintenance.html [L] :^.*$表示匹配任何路径

  合起来表述:如果%{DOCUMENT_ROOT}/system/maintenance.html存在,并且请求的不是 maintenance.html,那么对于任何路径的请求,都改写成对/system/maintenance.html的请求,并且这个 RewriteRule匹配之后,不再对后面的RewriteRule进行处理。(因为有[L]标记)

# if cgi-bin,then stop RewriteRule
  RewriteRule ^/cgi-bin/upload\.py$ /cgi-bin/upload.py [QSA,PT,L]
QSA表示将原来的query string部分加上去,而PT表示经过RewriteRule之后,还要继续进行uri到filename的转换,比如alias,scriptalias等等,L表示最后一个RewriteRule.

# Rewrite index to check for static
  RewriteRule ^/$ /index.html [QSA]

  将/替换成/index.html,QSA表示将原来的query string部分添加上去。

# Rewrite to check for Rails cached page
  RewriteRule ^([^.]+)$ $1.html [QSA]

# Redirect all non-static requests to cluster
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]

查看更多关于capistrano的详细内容...

  阅读:45次