title: Nginx gives a 403 error for CSS/JS files
body: <p>I have setup nginx 0.7.67 on Ubuntu10.10 along with php-cli . I'm trying to get my front-controller based PHP framework to run, but all pages except index.php give a 403 error.</p>
  
  <p>Ex :</p>
  
  <ol>
  <li><a href="http://mysite.com/styles/style.css" rel="noreferrer">http://mysite.com/styles/style.css</a> - 403 Forbidden</li>
  <li><a href="http://mysite.com/scripts/script.css" rel="noreferrer">http://mysite.com/scripts/script.css</a> - 403 Forbidden</li>
  <li><a href="http://mysite.com/index.php" rel="noreferrer">http://mysite.com/index.php</a> - Works</li>
  </ol>
  
  <p>My <strong>/etc/nginx/sites-enabled/default</strong> is as follows </p>
  
  <pre><code>server {
      listen          80;
      server_name     mysite.com;
  
      access_log      /var/log/nginx/access.log;
      error_log       /var/log/nginx/error.log warn;
  
      index           index.php index.html;
      root        /full/path/to/public_html;
  
      location ~* \.(js|css|png|jpg|jpeg|gif|ico|html)$ {
              expires max;
      }
  
  
      location ~ index.php {
              include     /etc/nginx/fastcgi_params;
              keepalive_timeout 0;
              fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;
              fastcgi_pass    127.0.0.1:9000;
      }
  
  }
  </code></pre>
  
  <p>Any suggestions on how to fix the above?</p>
  
  <p>PS: This is the entry from the error log</p>
  
  <pre><code>2010/10/14 19:56:15 [error] 3284#0: *1 open() "/full/path/to/public_html/styles/style.css" 
  failed (13: Permission denied), client: 127.0.0.2, server: quickstart.local, 
  request: "GET /styles/style.css HTTP/1.1", host: "mysite"
  </code></pre>