Build Apache + Mongrel best Ror Web server platform

Source: Internet
Author: User
Tags continue win32 port number

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.