Jan 22, 2011

Nginx: 403 Forbidden

When you found this weird error while using Nginx with Passenger, there can be of 2 causes.

First, try playing with permission stuff.

If that does not help, it might be because of your config file.

you config file should not look like this:

server {
listen 80;
server_name wikicards.org;
access_log /var/log/nginx/wikicards.access.log;
passenger_enabled on;

location / {
root /var/apps/wikicards/public;
index index.html index.htm;
}
}

* location and passenger_enabled on should not be in the same block. Remove the location block and that's it.