Symfony not configured with Nginx server


Ask A Question





Login To post a question

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.

Reference website:
https://www.nginx.com/resources/wiki/start/topics/recipes/symfony/

Here is my nginx code:-

   location / {
            index index.php;
            try_files $uri /index.php?$args=404;
   }

  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;
              #fastcgi_param REQUEST_URI $uri?$args=404;
    }

Here is the screenshot:
enter image description here

Thanks,

Vikram

For more info please click herehttps://stackoverflow.com/q/55177466



Have a question or need a custom quote?
info@smartinfocare.com