Datsik
Datsik

Reputation: 14824

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,

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. Here is my 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

user deploy www-data;

and then in the server { I have

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.

Upvotes: 0

Views: 201

Answers (1)

Hongli
Hongli

Reputation: 18924

You need to re-specify passenger_enabled in the location block.

Upvotes: 1

Related Questions