`
mathsfan
  • 浏览: 568124 次
  • 性别: Icon_minigender_1
  • 来自: 浙江省杭州市
社区版块
存档分类
最新评论

在Windows平台使用Lighttpd和Mongrel运行RoR(转)

阅读更多
一、安装mongrel
gem install mongrel –y
gem install mongrel_service -y

二、把Mongrel作为Services启动
mongrel_rails service::install -N depot -c d:\Rubyproject\depot -p 3000 –e production
-N指明服务名称,-d指明rails应用的目录,-p是mongrel监听的tcp端口,-e是启动模式为生产模式

这样打开控制面版|管理工具|服务,就可以发现增加了一项名为“depot”的服务,就可以通过控制面版来管理服务了。如果需要命令行启动和关闭该服务,那么:
mongrel_rails service::start -N depot
mongrel_rails service::stop -N depot

如果需要从服务中注销该项服务,那么:
mongrel_rails service::remove -N depot

如果需要安装多个mongrel实例,那么可以这样:
mongrel_rails service::install -N depot0 -c d:\Rubyproject\depot -p 3000 –e production
mongrel_rails service::install -N depot1 -c d:\Rubyproject\depot -p 3001 –e production
诸如此类。
三、安装Windows版本的Lighttpd
下载地址是:http://www.kevinworthington.com:8181/?p=116,windows版本的lighttpd默认被安装在c:/lighttpd,这个安装位置是不能修改的。

配置Lighttpd,配置port:

打开c:\lighttpd\etc\lighttpd.conf

取消 server.port = 81 前的注释,你也可以使用port:80

开启模块,其他模块不要乱开,会出问题

server.modules = ("mod_proxy",
"mod_rewrite",
"mod_accesslog",
"mod_alias" )

另外在这个配置文件末位加上:

proxy.debug = 0
proxy.balance = "fair"
proxy.server = ( "/" =>
(
( "host" => "127.0.0.1", "port" => 4001 ),
( "host" => "127.0.0.1", "port" => 4002 )
)
)

这里的port就是Mongrel server的port,启动Lighttpd使用命令:

c:\lighttpd\sbin\lighttpd.exe -D -f c:\lighttpd\etc\lighttpd.conf

通过http://localhost:81/ 就可以成功访问了哈。

文章摘自:
http://blog.sina.com.cn/u/4b6ea07001000755
http://www.i170.com/user/killercat/Article_40523
分享到:
评论

相关推荐

    Lighttpd 的windows版本

    Lighttpd 的windows版本 Lighttpd 1.4.35 发布了,该版本包含很多 bug 修复,包括 scan.coverity.com 扫描的问题。但最主要的是一个 SQL 注入(和路径遍历)问题:

    LightTPD for windows 1.4.45-x86

    自己在cygwin下编译的源码,并指定的默认配置文件路径和lib路径, 编译环境windows xp 32位 gcc version 4.9.2 (GCC) 编译参数: ./configure --prefix=XXXX --without-bzip2 配置文件为从源码dco/config目录获取后...

    Linux Lighttpd 配置安装 运行 测试

    在Linux上安装Lighttpd,里面有遇到的一些问题的解决方法,整个安装流程,还有参考网站

    用于ROR应用的lighttpd配置模板

    里面包含了lighttpd启动程序,lighttpd配置模板以及一个控制lighttpd启动和关闭的脚本。

    lighttpd for windows

    可以安装在windows上的lighttpd,轻量级webserver ,占用自资源非常少,效率相当高。

    LightTPD for windows 1.4.45-x64

    自己在cygwin下编译的源码,并指定的默认配置文件路径和lib路径, 编译环境windows7 64位 gcc version 5.4.0 (GCC) 编译参数: ./configure --prefix=XXXX --without-bzip2 配置文件为从源码dco/config目录获取后进行...

    ARM平台lighttpd服务器

    ARM平台lighttpd服务器,测试可用

    ubuntu lighttpd实现websocket

    如何在ubuntu上实现lighttpd 1、下载mongoose使用mongoose中的example中的websocket_chat,实现websocket 2、websocket_chat源码下载路径 官网:https://cesanta.com 论坛:...

    lighttpd和nginx比较

    introduce the main difference between lighttpd and nginx

    Lighttpd源码分析_mobi

    本书主要针对lighttpd源码进行了深度剖析。主要内容包括:lighttpd介绍与分析准备工作、lighttpd网络服务主模型、lighttpd数据结构、伸展树、... 本书适合使用lighttpd的人员和爱好者参考。  mobi格式,文字高清版。

    最新lighttpd源码 lighttpd-1.4.22

    支持FastCGI, CGI, Auth, 输出压缩(output compress), URL重写, Alias等重要功能,而Apache之所以流行,很大程度也是因为功能丰富,在lighttpd上很多功能都有相应的实现了,这点对于apache的用户是非常重要的,因为...

    Lighttpd源码分析

    资源名称:Lighttpd源码分析内容简介: 作为最为优秀的轻量级Web Server之一,Lighttpd有着众多的忠实拥护者和使用者。Lighttpd源码分析就是一本介绍分析Lighttpd源码的初级读本,其主要目标在于:一方面让已经接触...

    简明Windows,lighttpd,fastcgi,php5 Web服务器配置

    NULL 博文链接:https://yeahoo.iteye.com/blog/319066

    lighttpd配置和启动脚本

    包括lighttpd.conf配置文件以及用于控制web server启动和停止的脚本。

    在Lighttpd服务器中运行Django应用的方法

    确保 mod_fastcgi 在模块列表中,它需要出现在 mod_rewrite 和 mod_access ,但是要在 mod_accesslog 之前。 将下面的内容添加到你的lighttpd的配置文件中: server.document-root = /home/user/public_ht

    实现在Windows下安装Lighttpd的方法

    大致经历一下几个步骤: 1、windows系统下需要cygwin 环境的支持,如是先下载安装cygwin。 2、下载lighttpd源代码并解压(from http://trac.lighttpd.net/) 3、在cygwin 环境下进入lighttpd的下载后保存的目录,...

    lighttpd fastcgi

    1.修改lighttpd.conf 修改为自己的工作目录 var.server_root = "/home/caoft/lighttpd/lighttpd_websocket_fastcgi/http_server" var.state_dir = "/home/caoft/lighttpd/lighttpd_websocket_fastcgi/http_server"...

    lighttpd-1.4.45_lighttpd服务器_

    lighttpd轻量级web嵌入式服务器,方便嵌入式平台移植,小巧安全

    ZBlogPHP是一款强大的博客程序,可运行在Windows、Linux、macOS等众多操作系统之上.rar

    Z-Blog PHP可以运行在Windows、Linux等众多平台上,支持PHP 5.2 - 5.6、PHP 7.0和HHVM,支持IIS、Apache、Lighttpd、Nginx、Kangle等Web服务器。 Z-Blog PHP同时支持MySQL(MariaDB)和SQLite双数据库。 2、Zblog ...

Global site tag (gtag.js) - Google Analytics