然后安装Mongrel,使用命令行:gem install mongrel –include-dependencies命令来安装的,安装的时候注意选择windows版本的,在rails app目录下面运行mongrel_rails start -p 4001,就可以开启Mongrel server,之前我有发表一片叫做《Mongrel---Faster Is Possible》的文章,注意除了安装Mongrel,还要安装service
刚从WEBrick转到Mongrel会感觉速度快了很多,使用-e production 开启 production environment
把Mongrel安装成为Windows服务:
mongrel_rails service::install -N MyApp_Dev -c C:RailsMyApp -p 4001 -e production
你可以设置成为自动,安装成为服务是很必要的,因为,你不可能每次都登录服务器,来运行你的server,即使你加到启动中,你也需要使用用户登录之后系统才可以自动启动
假如你想删除这个服务使用:
mongrel_rails service::remove -N MyApp_Dev
配置Lighttpd,配置port:
打开c:lighttpdetclighttpd.conf
取消 server.port = 81 前的注释,你也可以使用port:80
开启模块,其他模块不要乱开,会出问题
server.modules = ("mod_proxy", "mod_rewrite", "mod_accesslog", "mod_alias" )
(编辑:aniston)
|