title: Symfony not configured with Nginx server
body: <p>I am new in PHP Symfony, I am trying configure symfony project with nginx but it is showing nginx 404 error, symfony path URL not working. only index.php file working.</p>
  
  <p>Reference website:
  <a href="https://www.nginx.com/resources/wiki/start/topics/recipes/symfony/" rel="nofollow noreferrer">https://www.nginx.com/resources/wiki/start/topics/recipes/symfony/</a></p>
  
  <p><strong>Here is my nginx code</strong>:-</p>
  
  <pre><code>server {
  
      #listen [::]:80 default_server;
  
      server_name dummyurl.com;
      root /var/www/html/folder name;
      index index.html index.php;
  
      location / {
      # try to serve file directly, fallback to index.php
        try_files $uri /index.php$is_args$args;
     }
  
      # pass PHP scripts to FastCGI server
      #
      location ~ \.php$ {
                fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
                fastcgi_split_path_info ^(.+\.php)(\.*)$;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                fastcgi_param DOCUMENT_ROOT $realpath_root;
                internal;
                #fastcgi_param REQUEST_URI $uri?$args=404;
      }
  
  
  }
  </code></pre>
  
  <p>Here is the screenshot:
  <a href="https://i.stack.imgur.com/csQAJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/csQAJ.png" alt="enter image description here"></a></p>