Nginx unknown directive “upstream” error when depl

2019-06-13 15:28发布

问题:

I am trying to install an standard Rails app. After going through a tutorial https://coderwall.com/p/yz8cha I am stuck at last step.

When trying to restart nginx I get the following error - Restarting nginx: nginx: [emerg] unknown directive "upstream" in /etc/nginx/nginx.conf:1 ; nginx: configuration file /etc/nginx/nginx.conf test failed

I have strictly followed all the steps in https://coderwall.com/p/yz8cha so my conf files and unicorn.rb files are pretty much same with changes in projectname and user.

My nginx conf file - http://pastebin.com/bd0RRDxK

回答1:

The nginx.conf mentioned here https://coderwall.com/p/yz8cha is supposed to be put in your rails app at config/nginx.conf.

This file is then sym linked for nginx to be picked up.



标签: nginx unicorn