nginx + passenger 配置
cookqq ›博客列表 ›nginx

nginx + passenger 配置

2015-06-25 01:21:35.0|分类: nginx|浏览量: 1982

摘要: 首先通过gem安装passenger gem install passenger 因为Nginx不支持动态module载入,所以需要通过Passenger来自动下载,编译,安装由Passenger修改版的Nginx:

首先通过gem安装passenger

gem install passenger

因为Nginx不支持动态module载入,所以需要通过Passenger来自动下载,编译,安装由Passenger修改版的Nginx:

passenger-install-nginx-module

Yes: download, compile and install Nginx for me. (recommended)
The easiest way to get started. A stock Nginx 1.0.10 with Passenger
support, but with no other additional third party modules, will be
installed for you to a directory of your choice.

No: I want to customize my Nginx installation. (for advanced users)
Choose this if you want to compile Nginx with more third party modules
besides Passenger, or if you need to pass additional options to Nginx's
'configure' script. This installer will 1) ask you for the location of
the Nginx source code, 2) run the 'configure' script according to your
instructions, and 3) run 'make install'.

Whichever you choose, if you already have an existing Nginx configuration file,
then it will be preserved.

Enter your choice (1 or 2) or press Ctrl-C to abort: 这里建议选择1

因为它会自动下载ngnix。


Please specify a prefix directory [/opt/nginx]: /usr/local/nginx(自己设置路径,默认的路径是/opt/nginx)

Passenger会自动帮你将下面两行添加到Nginx的配置文件中/opt/nginx/conf/nginx.conf(很人性化)

http {
  ...
  passenger_root /Users/Daniel/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.10;
  passenger_ruby /Users/Daniel/.rvm/wrappers/ruby-1.9.2-p290/ruby;
  ...
}

请不要忘记将nginx命令行程序连接到/usr/sbin

sudo ln -s /ope/nginx/sbin/nginx /usr/sbin/



一键分享文章

分类列表

  • • struts源码分析
  • • flink
  • • struts
  • • redis
  • • kafka
  • • ubuntu
  • • zookeeper
  • • hadoop
  • • activiti
  • • linux
  • • 成长
  • • NIO
  • • 关键词提取
  • • mysql
  • • android studio
  • • zabbix
  • • 云计算
  • • mahout
  • • jmeter
  • • hive
  • • ActiveMQ
  • • lucene
  • • MongoDB
  • • netty
  • • flume
  • • 我遇到的问题
  • • GRUB
  • • nginx
  • • 大家好的文章
  • • android
  • • tomcat
  • • Python
  • • luke
  • • android源码编译
  • • 安全
  • • MPAndroidChart
  • • swing
  • • POI
  • • powerdesigner
  • • jquery
  • • html
  • • java
  • • eclipse
  • • shell
  • • jvm
  • • highcharts
  • • 设计模式
  • • 列式数据库
  • • spring cloud
  • • docker+node.js+zookeeper构建微服务
版权所有 cookqq 感谢访问 支持开源 京ICP备15030920号
CopyRight 2015-2018 cookqq.com All Right Reserved.