使用Passenger+nginx部署Rails_Ruby_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > Ruby > 使用Passenger+nginx部署Rails

使用Passenger+nginx部署Rails

 2010/12/30 8:05:58  hideto  http://hideto.javaeye.com  我要评论(0)
  • 摘要:1.InstallPassendergeminstallpassenger2.Installnginxpassenger-install-nginx-module1.Yes:download,compileandinstallNginxforme.(recommended)Pleasespecifyaprefixdirectory[/opt/nginx]:/opt/nginx3.DeployRailsappvi/opt/nginx/conf/nginx.confserver{listen80
  • 标签:使用 rails Nginx
1. Install Passender
gem install passenger


2. Install nginx
passenger-install-nginx-module
1. Yes: download, compile and install Nginx for me. (recommended)
Please specify a prefix directory [/opt/nginx]: /opt/nginx


3. Deploy Rails app
vi /opt/nginx/conf/nginx.conf
server {
        listen       80;
        server_name  localhost;
        root /xx/xx/rails_app/public;
        passenger_enabled on;
        rails_env production;
}


4. Start/Stop nginx
/opt/nginx/sbin/nginx
/opt/nginx/sbin/nginx -s quit
发表评论
用户名: 匿名