zoukankan      html  css  js  c++  java
  • Setting up Unicorn with Nginx

    gem install unicorn
    or
    gem '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 nginx
    sudo 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 unicorn
    or
    gem '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_PATH
    
    stderr_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
    
  • 相关阅读:
    [转]TeeChart经验总结 5.Axis
    查询
    [转]VS2010安装说明及所有安装出错的解决办法
    [转]游标
    [转]在C#中实现串口通信
    delphi日期的使用
    Http(1)
    表的操作
    存储过程
    CKeditor
  • 原文地址:https://www.cnblogs.com/iosdev/p/3348700.html
Copyright © 2011-2022 走看看