I just ran "gem update passenger" in order to upgrade from 3.0.7 to 3.0.8 and ran "passenger-install-nginx-module" with the same configuration I had before:

nginx: nginx version: nginx/1.0.5
nginx: built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/usr/local/nginx --with-
http_ssl_module --with-cc-opt=-Wno-error --with-pcre=/tmp/root-
passenger-2401/pcre-8.12 --add-module=/usr/local/lib/ruby/gems/1.9.1/
gems/passenger-3.0.8/ext/nginx --with-http_gzip_static_module

Now, I get a 403 error when going to example.com:

2011/08/29 17:42:39 [error] 26601#0: *5 directory index of "/home/
deploy/staging.example.com/current/public/" is forbidden, client:
256.1.2.3, server: staging.example.com, request: "GET / HTTP/
1.1", host: "staging.example.com"

Here's my conf file:

worker_processes  1;
error_log  logs/error.log;

events {
  worker_connections  1024;
}

http {
  passenger_root /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.8;
  passenger_ruby /usr/local/bin/ruby;

  include       mime.types;
  default_type  application/octet-stream;
  sendfile        on;
  keepalive_timeout  65;

  gzip_static on;
  gzip_http_version   1.1;
  gzip_proxied        expired no-cache no-store private auth;
  gzip_types       text/plain application/x-javascript text/css image/jpeg image/png;
  gzip_disable        "MSIE [1-6]\.";
  gzip_vary           on;

  server {
    listen 443;
    ssl on;
    ssl_certificate /etc/ssl/localcerts/example.com.chained.crt;
    ssl_certificate_key /etc/ssl/localcerts/example.com.key;

    server_name staging.example.com;
    root /home/deploy/staging.example.com/current/public;

    location ~ ^/assets/ {
      passenger_enabled on;
      expires max;
    }

    location ~* \.(js|css|png|jpg|gif|ico)$ {
      passenger_enabled on;
      if ($query_string ~ "^[0-9]+$") {
        expires max;
      }
    }

    location / {
      passenger_enabled on;
    }
  }

  server {
    listen 80;
    server_name staging.example.com;
    root /home/deploy/staging.example.com/current/public;
    rack_env staging;

    location ~ ^/assets/ {
      passenger_enabled on;
      expires max;
    }

    location ~* \.(js|css|png|jpg|gif|ico)$ {
      passenger_enabled on;
      if ($query_string ~ "^[0-9]+$") {
        expires max;
      }
    }

    location / {
      passenger_enabled on;
    }
  }
}

What is causing the 403 error? I'm able to load static assets, e.g. CSS files, without error.

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.