问题描述
我正在尝试安装标准的Rails应用.经过教程 https://coderwall.com/p/yz8cha 之后,我陷入了最后一步.
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.
尝试重新启动Nginx时,出现以下错误-Restarting nginx: nginx: [emerg] unknown directive "upstream" in /etc/nginx/nginx.conf:1 ; nginx: configuration file /etc/nginx/nginx.conf test failed
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
我严格遵守 https://coderwall.com/p/yz8cha 中的所有步骤,因此我的conf文件和unicorn.rb文件与项目名称和用户的更改几乎相同.
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.
我的nginx conf文件- http://pastebin.com/bd0RRDxK
My nginx conf file - http://pastebin.com/bd0RRDxK
推荐答案
此处提到的nginx.conf
https://coderwall.com/p/yz8cha 应该放在config/nginx.conf
的rails应用中.
The nginx.conf
mentioned here https://coderwall.com/p/yz8cha is supposed to be put in your rails app at config/nginx.conf
.
然后将此文件符号链接以获取nginx.
This file is then sym linked for nginx to be picked up.
这篇关于Nginx未知指令“上游"部署Rails时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!