The current best rails site deployment should be to use Apache 2.2.3 Mod_proxy_balancer for Mongrel load balancing.
Just online site, mongrel although slightly slower, but also enough support. The station completes first, then considers the big flow impact.
The process of installing the mongrel (the premise has been pressed with Rubygem ruby+rails):
Gem Install Win32-service #在更新下来的列表里选择最新版本安装
Gem install mongrel #选择最新 Win32 version
Gem Install Mongrel_service
After successfully running the above instructions in the CMD console, mongrel has been successfully installed
Mongrel Command Use method:
Mongrel_rails/-h #查看所有命令
Mongrel_rails service::install #查看 service::install Command Help description
Start using mongrel:
Mongrel_rails service::install-n myapp-c c:\myapp-p 4000-e production # represents the deployment of a site called MyApp, its physical path is C:\myapp, its port number is 4000, shipped Row in the publishing environment
Mongrel_rails service::start-n MyApp # Launch name MyApp this site service
Mongrel_rails service::stop-n MyApp # Stop name MyApp site service
Alternatively, you can set the boot Auto Start site service option in the Help desk in the Windows system
Next, start setting up Apache
ServerName myapp.com
Serveralias www.myapp.com
Proxypass/http://www.myapp.com:8000/
proxypassreverse/http://www.myapp.com:8000
Proxypreservehost on
Leave the request for the static file to Apache for processing because it is better at
Proxypass/images!
Proxypass/stylesheets!
#continue with the other static files, that should is served by Apache
Alias/images/path/to/public/images
Alias/stylesheets/path/to/public/stylesheets
#continue with aliases for static content