博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Setting up Unicorn with Nginx
阅读量:7066 次
发布时间:2019-06-28

本文共 1014 字,大约阅读时间需要 3 分钟。

gem install unicornorgem 'unciron'

 

1 install Nginx

yum install ...

2 Configuration

vi /etc/nginx/nginx.conf

 It's adviced to run as a seperae user.

Here is a example:

sudo user add -s /sbin/nologin -r nginxsudo usermod -a -G web nginx ; add nginx user into web group sudo mkdir /var/www ;this should be the static path in nginx.conf sudo chgrp -R web /var/www ;set this path to group "web" sudo chmod -R 775 /var/www ;set group write permission sudo usermod -a -G web yourusername; Add your current use to be able to modify the contents of this part

 3 Install unicorn

gem install unicornorgem 'unicron'

 install unicorn file

curl -o config/unicorn.rb https://raw.github.com/defunkt/unicorn/master/examples/unicorn.conf.rb

 4. The very basic of the unicorn

APP_PATH = "/var/www/unicorn"working_directory APP_PATHstderr_path APP_PATH + "/log/unicorn.stderr.log"stdout_path APP_PATH + "/log/unicorn.stderr.log"pid APP_PATH + "/tmp/pid/unicorn.pid"

 5 Startup unicorn

unicorn_rails -c /var/www/unicorn/config/unicorn.rb -D

 

 

转载地址:http://sxxll.baihongyu.com/

你可能感兴趣的文章
分享一个德州扑克的算法
查看>>
SQL Server2012 创建定时作业——图文并茂,教你轻松快速创建
查看>>
Response.Redirect 打开新窗体的两种方法
查看>>
lua 的 table 处理
查看>>
js 使用for循环遍历数组
查看>>
android中自定义的dialog中的EditText无法弹出输入法解决方案
查看>>
Android 70道面试题汇总不再愁面试
查看>>
字符串和数字的全排列问题、前i位被i整除问题
查看>>
互联网我来了 -- 2. js中"异步/堵塞"等概念的简析
查看>>
Linux下用来获取各种系统信息的C++类
查看>>
深入浅出OpenStack云计算平台管理(nova-compute/network)
查看>>
Redis学习手册(Sorted-Sets数据类型)
查看>>
DAO模式
查看>>
Linux工具入门:make工具与Makefile文件
查看>>
Navicat Premium 连接 Oracle 数据库
查看>>
表达式拼接Expression<Func<IEntityMapper, bool>> predicate
查看>>
[改善Java代码]在switch的default代码块中增加AssertionError错误
查看>>
李洪强漫谈iOS开发[C语言-004]-开发概述程序设计语言程序编译过程
查看>>
[css]通过transform缩放邮件客户端h5页面
查看>>
微软要解决癌症问题?
查看>>