Nginx + Passenger -- RVM
You should install RVM.
1. > gem install passenger
2. > rvm wrapper 1.9.2 passenger
#1.9.2 is the ruby version in RVM, you can use ree or other..
If you use passenger 2.X
> rvm 1.9.2 --passenger
Run RVM using your desired Ruby interpreter, and pass the '--passenger' option. This will generate wrapper scripts in RVM's bin directory (see Notes below). These wrapper scripts ensure environment variables such as GEM_HOME and GEM_PATH are set correctly for applications run by passenger.
3. > rvmsudo install-passenger-nginx-module
# You should install some dependent lib..
# Passenger will help you install nginx, the folder is in /opt/nginx
If you can't install passenger, you need some lib.
http://rvm.beginrescueend.com/packages/
4. > sudo vi /opt/nginx/conf/nginx.conf
http {
passenger_root /home/programmer/.rvm/gems/ruby-1.9.2-p0/gems/passenger-2.2.15;
passenger_ruby /home/programmer/.rvm/bin/passenger_ruby;
....
server {
listen 80;
server_name ac;
root /home/programmer/workspace/AC_rails3/public;
passenger_enabled on;
rails_env development;
}
..
}
5. > sudo vi ~/.bashrc
#add
alias nst='ps aux | grep nginx'
alias sn='echo start nginx; sudo /opt/nginx/sbin/nginx ; nst'
alias kn='echo stop nginx; sudo kill `cat /opt/nginx/logs/nginx.pid` ; nst '
alias rn='kn ; sn'
#sn = start nginx
#kn = kill nginx
#rn = restart nginx
分享到:
相关推荐
ffmpeg+nginx+nginx-rtmp-module搭建个人直播平台。 使用说明(ffmpeg+nginx+rtmp-module已经整合,支持HTTP,具体配置查看conf/nginx.conf): 1.解压后,运行nginx_start.bat。(查看监控状态 ...
nginx+php-fpm解决502 Bad Gateway.zip
ffmpeg+nginx-rtmp-module+flv监控展示全量资源,包含ffmpeg、编译后的nginx-rtmp-module、flv.min.js、前端展示代码,内含操作文档
1、在Windows系统下,搭建ffmpeg推流+nginx-http-flv-module直播拉流+FLV.js播放环境,所需依赖相关资源文件。 2、适合初学、研究、验证视频直播部署方案的相关技术人员。
nginx + nginx-http-flv-module-1.2.9
nginx-1.16.1.tar.gz + nginx-upload-module-2.3.0.tar.gz
nginx+lua+docker+docker-compose实现简单服务分发
解决nginx+php-fpm无法上传文件问题.docx
gcc gcc-c++ libstdc++-devel安装ORACLE、nginx时所必备依赖包,格式为RPM,可直接用rpm语句来安装。
CentOS7 自动化搭建Nginx+PHP7+Mysql+Docker+Docker-Compose Shell脚本,Docker version 18.06.1-ce,docker-compose version 1.22.0
nginx带nginx-http-flv模块,包含所有rtmp功能,我自己在windows下编译的,直接可用,用的是最新版的1.19.4版本
nginx1.16版本 后端节点健康检查、自动隔离+nginx_upstream_check_module-master+nginx-upload-module
本安装文件修改了源码网的“CentOS 集成linux+php-cgi+nginx+mysql安装包“里面的部分文件,主要是修改了install.sh内的几个错误位置。目前我测试在centos 5.4下,安装一切正常! 使用这个安装之前请一定看一下本...
在windows 7 64位 环境下使用nginx的nginx-http-flv-module搭建flv视频流播放所有的安装包,参考:https://blog.csdn.net/qq_33071429/article/details/102628008
Nginx + PHP-FPM + APC=绝妙的组合 Nginx + PHP-FPM + APC=绝妙的组合 Nginx + PHP-FPM + APC=绝妙的组合 Nginx + PHP-FPM + APC=绝妙的组合
FastDFS+Nginx+libfastcommon+fastdfs-nginx-module安装所需所有中间件
使用阿里云轻量级服务器+Django+Nginx+gpt-3.5-turbo开发一个ChatGPT前端
jdk-8u151+maven-3.3.9+nginx-1.9.12+zookeeper-3.3.6+tomcat-8.5.23+redis-2.6 资源整合下载
centos5.2 源码安装nginx+php-fpm+http push,演示http push 功能,测试通过
实时视频流开发(nignx+nginx-http-flv-module-master+ffmpeg)所需资源下载