title: Symfony 404 not found
body: <p>I'm new to symfony.</p>
  
  <p>I did: </p>
  
  <pre><code>rm -rf app/cache/*
  rm -rf app/logs/*
  </code></pre>
  
  <p>Then:</p>
  
  <pre><code>sudo setfacl -R -m u:www-data:rwx -m u:user :rwx app/cache app/logs
  sudo setfacl -dR -m u:www-data:rwx -m u:user:rwx app/cache app/logs
  </code></pre>
  
  <p><code>ls -al</code> gives:</p>
  
  <pre><code>drwxrwxrwx 3 user user  1024 мая   29 00:06 cache(cache is on green background)
  drwxrwxrwx 2 user user  1024 мая   29 00:06 logs(logs is on green background)
  </code></pre>
  
  <p>Now i'm trying to access /Symfony/web/app_dev.php - It shows: </p>
  
  <p>An error occurred while loading the web debug toolbar (404: Not Found).</p>
  
  <p>Do you want to open the profiler?</p>
  
  <p>When i click OK, it redirect to </p>
  
  <pre><code>/Symfony/web/app_dev.php/_profiler/bd8604738ac7af3c9d0611ea12076f0f62422601
  </code></pre>
  
  <p>and 404 file not found.. </p>
  
  <p>This is app/logs/dev.log</p>
  
  <pre><code>[2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] []
  [2013-05-29 00:12:29] request.INFO: Matched route "_welcome" (parameters: "_controller": "Acme\DemoBundle\Controller\WelcomeController::indexAction", "_route": "_welcome") [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\Fragment\FragmentHandler::onKernelRequest". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DeprecationLoggerListener::injectLogger". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.controller" to listener "Acme\DemoBundle\EventListener\ControllerListener::onKernelController". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\FirePHPHandler::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\ChromePhpHandler::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\CacheListener::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ResponseListener::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\Fragment\FragmentHandler::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\Security\Http\RememberMe\ResponseListener::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\StreamedResponseListener::onKernelResponse". [] []
  [2013-05-29 00:12:29] event.DEBUG: Notified event "kernel.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onKernelTerminate". [] []
  </code></pre>
  
  <p>I've not found an solution, please help</p>
  
  <p>Edit:</p>
  
  <p>Routing_dev.xml </p>
  
  <pre><code>_welcome:
      pattern:  /
      defaults: { _controller: AcmeDemoBundle:Welcome:index }
  
  _demo_secured:
      resource: "@AcmeDemoBundle/Controller/SecuredController.php"
      type:     annotation
  
  _demo:
      resource: "@AcmeDemoBundle/Controller/DemoController.php"
      type:     annotation
      prefix:   /demo
  
  _wdt:
      resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
      prefix:   /_wdt
  
  _profiler:
      resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
      prefix:   /_profiler
  
  _configurator:
      resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
      prefix:   /_configurator
  
  _main:
      resource: routing.yml
  </code></pre>
  
  <p>config_dev.xml</p>
  
  <pre><code>imports:
      - { resource: config.yml }
  
  framework:
      router:   { resource: "%kernel.root_dir%/config/routing_dev.yml" }
      profiler: { only_exceptions: false }
  
  web_profiler:
      toolbar: true
      intercept_redirects: false
  
  monolog:
      handlers:
          main:
              type:  stream
              path:  %kernel.logs_dir%/%kernel.environment%.log
              level: debug
          firephp:
              type:  firephp
              level: info
          chromephp:
              type:  chromephp
              level: info
  
  assetic:
      use_controller: true
  
  #swiftmailer:
  #    delivery_address: me@example.com
  </code></pre>
  
  <p>app_dev.php</p>
  
  <pre><code>&lt;?php
  
  use Symfony\Component\HttpFoundation\Request;
  
  // If you don't want to setup permissions the proper way, just uncomment the following PHP line
  // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
  //umask(0000);
  
  // This check prevents access to debug front controllers that are deployed by accident to production servers.
  // Feel free to remove this, extend it, or make something more sophisticated.
  if (isset($_SERVER['HTTP_CLIENT_IP'])
      || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
      || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))
  ) {
      header('HTTP/1.0 403 Forbidden');
      exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
  }
  
  $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
  require_once __DIR__.'/../app/AppKernel.php';
  
  $kernel = new AppKernel('dev', true);
  $kernel-&gt;loadClassCache();
  Request::enableHttpMethodParameterOverride();
  $request = Request::createFromGlobals();
  $response = $kernel-&gt;handle($request);
  $response-&gt;send();
  $kernel-&gt;terminate($request, $response);
  </code></pre>