title: 404 not found in symfony
body: <p>I need a test function but it is not working. Supposedly with Routing + Controller should work, but I get a 404 not found.</p>
  
  <p>This is my <code>/app/config/routing.yml</code>:</p>
  
  <pre><code>AndroidAPIBundle:
      resource: "@MDPIAndroidApiBundle/Controller/"
      type:     annotation
      prefix:   /
  </code></pre>
  
  <p>Inside <code>Controller</code> directory I have <code>LoginController.php</code>:</p>
  
  <pre><code>/**
   * @Route("/api/test", name="test")
   */
  public function getAction(Request $request)
  {
      $format = "json";
      $view = View::create()-&gt;setStatusCode(201)-&gt;setData(array("status"=&gt;"OK", "data"=&gt;array("test" =&gt; "DAN TEST")))-&gt;setFormat($format);
      return $this-&gt;get('fos_rest.view_handler')-&gt;handle($view);
  }
  </code></pre>
  
  <p>So why when I make a curl request I get a 404 message? Also in browser adding <code>/api/test</code> to my local url.</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>php app/console router:debug
  
  test                                         ANY    ANY    ANY  /api/test
  </code></pre>
  
  <p><strong>EDIT 2</strong></p>
  
  <p><code>/etc/nginx/sites-available/susy_android_final</code></p>
  
  <pre><code>server {
      listen                  80;
      server_name             susy.android.final.local;
      access_log              /var/log/nginx/susy_android_final.access.log;
      error_log               /var/log/nginx/susy_android_final.error.log;
      root                    /var/www/susy.mdpi.com.final/web;
  
      client_max_body_size 500M;
      large_client_header_buffers 8 64k; 
  
      location / {
              index app_dev.php;
              if (-f $request_filename) {
              break;
              }
              rewrite ^(.*)$ /app_dev.php last;
      }
      ## Parse all .php file in the /var/www directory
     location ~ (app|app_dev|app_eudev).php {
              fastcgi_split_path_info         ^(.+\.php)(.*)$;                
              fastcgi_pass                    unix:/var/run/php/php5.6-fpm.sock; 
              #fastcgi_pass                   127.0.0.1:9001; 
              #fastcgi_index                  index.php;
              fastcgi_param                   SCRIPT_FILENAME  $request_filename;
              include                         fastcgi_params;
  
     }
  
  
  }
  </code></pre>
  
  <p><code>/etc/hosts</code></p>
  
  <pre><code>127.0.0.1 susy.android.final.local
  </code></pre>
  
  <p>This is in ubuntu</p>