title: Symfony2 Ngix 404 error and RuntimeException: Unable to write in the logs directory
body: <p>I installed Nginx with php fpm, and configured, everything seemed to be working fine until I downloaded Symfony2. When I try to access app.php I get The server returned a "404 Not Found".  error, and when I try to access app_dev.php I get RuntimeException: Unable to write in the logs directory, as the error cleary stated permisions problem i tryed in <a href="http://symfony.com/doc/current/book/installation.html" rel="nofollow">http://symfony.com/doc/current/book/installation.html</a> tutorial offered solutions with ACL, but that didn't helped, event tryed "unmask(0000)" in app/console, web/app_dev.php, web/app.php, no success either. 
  My nginx setup:</p>
  
  <pre><code>upstream phpfcgi {
      #server 127.0.0.1:9000;
      server unix:/var/run/php5-fpm.sock; #for PHP-FPM running on UNIX socket
  }
  server {
      listen 80;
  
      server_name localhost;
      root /home/antanas/public_html/demo/web;
  
      error_log /var/log/nginx/demo.error.log;
      access_log /var/log/nginx/demo.access.log;
  
      # strip app.php/ prefix if it is present
      rewrite ^/app\.php/?(.*)$ /$1 permanent;
  
      location / {
          index app.php;
          try_files $uri @rewriteapp;
      }
  
      location @rewriteapp {
          rewrite ^(.*)$ /app.php/$1 last;
      }
  
      # pass the PHP scripts to FastCGI server from upstream phpfcgi
      location ~ ^/(app|app_dev|config)\.php(/|$) {
          fastcgi_pass phpfcgi;
          fastcgi_split_path_info ^(.+\.php)(/.*)$;
          include fastcgi_params;
          fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_param  HTTPS off;
      }
  }
  </code></pre>
  
  <p>What may be the cause of this problem?</p>