简体   繁体   中英

Unicorn + NGINX: cannot start unicorn

I just started playing around with Unicorn and NGINX set up (any full-blown reference would be appreciated. I have been crawling through google for three days and compile what I have to get my server running in rackspace).

Continuing to my question. It looks like I have, hopefully correctly, set up NGINX to point to the directory of my rails app. It was able to show the 500 error page. Now I am in the process of starting unicorn

unicorn_rails -c /home/deployer/public_html/app/config/unicorn.rb

and it gives me this error

/home/deployer/.rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.1.1/lib/unicorn/socket_helper.rb:144:in `initialize': Permission denied - bind(2) (Errno::EACCES)
    from /home/deployer/.rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.1.1/lib/unicorn/socket_helper.rb:144:in `new'
    from /home/deployer/.rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.1.1/lib/unicorn/socket_helper.rb:144:in `bind_listen'

I am trying to start the app on port 80 and I know that I need superuser permission to bind to anything lower than 1024. But when I try to use sudo it gives me

sudo: unicorn_rails: command not found

Any help would be appreciated!

尝试rvmsudo unicorn_rails -c /home/deployer/public_html/app/config/unicorn.rb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM