小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

冰狗的部落-搭建Apache Mongrel 最佳RoR Web服務(wù)器平臺

 魚非魚 2007-03-24

搭建Apache + Mongrel 最佳RoR Web服務(wù)器平臺

搭建Apache + Mongrel 最佳RoR Web服務(wù)器平臺
作者:Charles Brian Quinn
原文鏈接:http://mongrel./docs/apache.html

當(dāng)下最佳rails 站點部署應(yīng)該是 利用Apache 2.2.3的mod_proxy_balancer為Mongrel作負(fù)載均衡。
剛上線的站點,Mongrel雖然稍顯慢些,但也足夠支撐。先把站做好了,再考慮大流量沖擊吧。
安裝Mongrel的過程(前提已經(jīng)按好帶rubygem的ruby+rails):
gem install win32-service #在更新下來的列表里選擇最新版本安裝
gem install mongrel #選擇最新 win32版本
gem install mongrel_service
成功在cmd console中運行完以上指令后,mongrel 已經(jīng)安裝成功
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 ,運行在發(fā)布環(huán)境中

mongrel_rails service::start -N myapp # 啟動名叫myapp這個站點服務(wù)

mongrel_rails service::stop -N myapp # 停止名叫myapp站點服務(wù)

另外可以在windows系統(tǒng)中的服務(wù)臺中設(shè)置開機自動啟動站點服務(wù)的選項

下一步,開始設(shè)置Apache

ServerName
ServerAlias www.

ProxyPass / http://www.:8000/
ProxyPassReverse / http://www.:8000
ProxyPreserveHost on


將靜態(tài)文件的請求留給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

注:未完,后邊還有多Mongrel進程服務(wù)和負(fù)載均衡等高級應(yīng)用,目前還未到那等級,到用時補上。

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多