thin 配置

sudo thin config -C /etc/thin/<config-name>.yml -c <rails-app-root-path> --servers <number-of-threads> -e <environment>
thin config -C /etc/thin/redmine.yml -c /var/www/redmine --servers 5 -e production    
thin config -C /etc/thin/myapp.yml -c /var/rails/myapp --servers 5 --socket /tmp/thin.myapp.sock -e production

当执行第一条config命令,可能得到/etc/thin/redmine.yml内容如下

    ---  
    address: localhost  
    pid: tmp/pids/thin.pid  
    wait: 30  
    port: 3000  
    timeout: 30  
    log: log/thin.log  
    max_conns: 1024  
    require: []  
 
    environment: production  
    max_persistent_conns: 512  
    servers: 5  
    daemonize: true  
    chdir: /var/www/redmine

启动应用
sevice thin start
将会启动3000~3004共5个端口。
如果你有Nginx就可以设置一个代理转发了

No related posts.

分享到Twitter 分享到新浪微博 分享到开心 分享到QQ空间 分享到人人 分享到鲜果 分享到豆瓣 分享到网易微博 分享到搜狐微博
You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.

Powered by WordPress | Find Wireless Deals at BestInCellPhones.com. | Thanks to iCellPhoneDeals.com Free Cell Phones, Find Highest CD Rates and Incinerador De Grasa Revisión