当下最佳rails 站点部署应该是 利用Apache 2.2.3的mod_proxy_balancer为Mongrel作负载均衡。 刚上线的站点,Mongrel虽然稍显慢些,但也足够支撑。先把站做好了,再考虑大流量冲击吧。 安装Mongrel的过程(前提已经按好带rubygem的ruby+rails): gem install win32-service #在更新下来的列表里选择最新版本安装 gem install mongrel #选择最新 win32版本 gem install mongrel_service 成功在cmd console中运行完以上指令后,mongrel 已经安装成功 mongrel 的命令使用方法: mongrel_rails /-h #查看所有命令 mongrel_rails service::install #查看 service::install 命令的帮助说明 开始使用Mongrel: mongrel_rails service::install -N myapp -c c:myapp -p 4000 -e production # 表示部署一个名叫myapp的站点,它的物理路径是c:myapp,它的端口号是4000 ,运行在发布环境中 mongrel_rails service::start -N myapp # 启动名叫myapp这个站点服务 mongrel_rails service::stop -N myapp # 停止名叫myapp站点服务 另外可以在windows系统中的服务台中设置开机自动启动站点服务的选项 下一步,开始设置Apache ServerName myapp.com ServerAlias www.myapp.com ProxyPass / http://www.myapp.com:8000/ ProxyPassReverse / http://www.myapp.com:8000 ProxyPreserveHost on 将静态文件的请求留给Apache来处理,因为它更擅长 ProxyPass /images ! ProxyPass /stylesheets ! #continue with other static files that should be served by apache Alias /images /path/to/public/images Alias /stylesheets /path/to/public/stylesheets #continue with aliases for static content
详细解决方案
筹建Apache + Mongrel 最佳RoR Web服务器平台
热度:130 发布时间:2012-12-22 12:05:06.0
相关解决方案
- apache-tomcat-7.0.32下的html页面不能访问有关问题
- org.apache.jasper.JasperException: Unable to compile class for JSP:该怎么解决
- org.apache.catalina.connector.RequestFacade有关问题
- org.apache.jasper.JasperException: Unable to compile class for JSP:解决思路
- 有个有关问题,请各位帮忙看看:java.lang.ClassNotFoundException: org.apache.struts.action.Act
- httpclient老是提示java.lang.NoSuchMethodError: org.apache.http.protocol.BasicHttpCon
- org.apache.xerces.impl.msg.XMLMessages not loaded解决方案
- Server Apache Tomcat v6.0.35 at localhost failed to start
- apache+resin与iis+tomcat解决方法
- org.apache.http.client.HttpClient与org.apache.commons.httpclient.HttpClient的差别
- apache-FtpServer不能下传/新建中文名文件,文件夹
- org.apache.jasper.JasperException: java.lang.NullPointerException,该怎么处理
- org.apache.tomcat.util.http.Parameters processParameters,该怎么解决
- 请问:org.apache.jasper.JasperException: Cannot find any information on property 'userPhone' in a bean of type 'Bean.Sender'
- org.apache.axis.client.Service的有关问题
- org.apache.struts.actions.dispatchAction的错误?
- org.apache.catalina.core.ApplicationDispatcher invoke Servlet.service() for se解决思路
- apache+tomcat 无法解析servlet,该如何处理
- Eclipse 报错org.apache.catalina.LifecycleException: Failed to start component。该怎么解决
- java.lang.ClassNotFoundException: org.apache.velocity.Template解决方法
- 求帮助JSF有关问题:org.apache.jasper.JasperException: java.lang.NullPointerException
- myeclipse集成tomcat之后,启动tomcat,一直处在Starting Servlet Engine: Apache Tomcat/6.0.14,该如何解决
- org.apache.jasper.JasperException: java.lang.NumberFormatException: null,该怎么解决
- org.apache.jasper.JasperException: java.lang.NumberFormatException: null,该如何解决
- 软件 apache-tomcat(这是一个文件)跟 单独下载apache 和 tomcat有什么区别 ?该如何处理
- org.apache.commons.lang.exception.NestableRuntimeException
- org.apache.http包在那上载?
- myeclipse控制台程序运行报错:could not find the main class:org.apache.log4j.net.JMSSink.解决办法
- Apache Synapse ESB 怎么使用
- myeclipse控制台程序运作报错:could not find the main class:org.apache.log4j.net.JMSSink