title: access denied on nginx and php
body: <p>Using nginx web server and php. nginx is working, I see 'Welcome to nginx!' but I get 'access denied' when trying to access a php page. I also installed php-fastcgi.</p>
  
  <p>Here is my nginx default conf: </p>
  
  <pre><code># redirect server error pages to the static page /50x.html
  #
  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
      root   /usr/share/nginx/html;
  }
  
  # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  #
  #location ~ \.php$ {
  #    proxy_pass   http://127.0.0.1;
  #}
  
  # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  #
  location ~ \.php$ {
      root   /usr/share/nginx/html;
      fastcgi_index  index.php;
      fastcgi_pass unix:/var/run/php5-fpm.sock;
      include fastcgi_params;
     # fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
      fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
      include        fastcgi_params;
  }
  
  # deny access to .htaccess files, if Apache's document root
  # concurs with nginx's one
  #
  location ~ /\.ht {
      deny  all;
  }
  </code></pre>
  
  <p>I activited <code>security.limit_extensions = .php .php3 .php4 .php5 .html</code> and <code>listen = /var/run/php5-fpm.sock</code> in /etc/php-fpm.d/www.conf and <code>cgi.fix_pathinfo = 0</code> in /etc/php5/fpm/php.ini</p>
  
  <p>I restarted nginx and php5-fpm.</p>
  
  <p>Thanks for helping.</p>