简体   繁体   English

尝试为我的Rails生产服务器使用Passenger / Nginx,错误403

[英]Trying to use Passenger/Nginx for my Rails production server, 403 error

I'm trying to get my production server up and running on my Ubuntu 12.04 LTS server, I followed this tutorial step by step, 我试图在Ubuntu 12.04 LTS服务器上启动生产服务器并使其运行,我逐步按照本教程进行操作,

http://excid3.com/blog/setting-up-ubuntu-12-04-with-ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/#.UUAVdhnZVQI http://excid3.com/blog/setting-up-ubuntu-12-04-with-ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/#.UUAVdhnZVQI

but when I load nginx, I just get a 403 error. 但是当我加载nginx时,我只会收到403错误。 Here is my namei -om /home/deploy(user)/app 这是我的namei -om /home/deploy(user)/app

 drwxr-xr-x root   root     /
 drwxr-xr-x deploy www-data home
 drwxr-xr-x deploy www-data deploy
 drwxr-xr-x deploy www-data knowyourroute

and then in my nginx.conf I have at the VERY top 然后在我的nginx.conf中,我在顶部

user deploy www-data;

and then in the server { I have 然后在server {

listen 80;
server_name 10.0.0.30;
root /home/deploy/knowyourroute/public;
passenger_enabled on;

location / {
   root html;
   index index.html index.htm;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

I've googled the crap out of it tried changing permissions, groups, running it as root or running it as the user deploy but still nothing I'm running out of things to try if anybody has any idea that would be great. 我已经用谷歌搜索了它,尝试更改权限,组,以root用户身份运行或在用户deploy运行它,但是如果有人有什么好主意,我还是没什么可尝试的。

您需要在位置块中重新指定passenger_enabled。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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