title: 403 forbidden on wordpress index with nginx, the rest of the pages work fine
body: <p>I'm setting up my blog on a new EC2 instance because one of the sites on the server that's currently hosting it is being DDoSed. 
  I'm having some trouble with nginx, because I can either see all the pages fine but 403 on the index, or see the index but 404 on the pages (depending on the config I'm using)</p>
  
  <p>Here's my nginx config: </p>
  
  <pre><code>server {
      listen       80;
  
      server_name  www.test.com;
      server_name  test.com;
      root /www/blog;
  
      include conf.d/wordpress/simple.conf;
  }
  </code></pre>
  
  <p>And simple.conf:</p>
  
  <pre><code>location = /favicon.ico {
              log_not_found off;
              access_log off;
      }
  
      location = /robots.txt {
              allow all;
              log_not_found off;
              access_log off;
      }
  
      location / {
              # This is cool because no php is touched for static content. 
              # include the "?$args" part so non-default permalinks doesn't break when using query string
              try_files $uri $uri/ /index.php?$args;
      }
  
      location ~ \.php$ {
              #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
              include fastcgi.conf;
              fastcgi_intercept_errors on;
              fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
      }
  
      location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
              expires max;
              log_not_found off;
      }
  </code></pre>
  
  <p><strong>if I change the  try_files $uri $uri/ /index.php?$args; to index index.php</strong>, the front page will work fine and the rest will be 404. If I leave it like that, the front page is 403. </p>
  
  <p>Here's the error log: </p>
  
  <pre><code>2013/08/07 19:19:41 [error] 25333#0: *1 directory index of "/www/blog/" is forbidden, client: 64.129.X.X, server: test.com, request: "GET / HTTP/1.1", host: "www.test.com"
  </code></pre>
  
  <p>That directory is 755 on the nginx user:</p>
  
  <pre><code>drwxr-xr-x 6 nginx nginx  4096 Aug  7 18:42 blog
  </code></pre>
  
  <p>Is there anything obvious I'm doing wrong ?</p>
  
  <p>Thanks !</p>