1

I'm getting the following Error on the server:

Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /"" at ../vendor/symfony/http-kernel/EventListener/RouterListener.php line 136

Routes are properly defined within /config/routes/annotations.yaml

controllers:
  resource: ../../src/Controller/
  type: annotation

kernel:
  resource: ../../src/Kernel.php
  type: annotation

On local, the application works without any issues. It happens only on the host where I deploy the Symfony application. Cache has been cleared with php bin/console cache:clear. I even deleted var/* and vendor/* and did a fresh install of the packages via Composer (got it to the latest version by the way). Regarding application, it is - Symfony v4.4.19 Flex.

Etereal
  • 51
  • 3
  • Does 'bin/console debug:router' show any routes defined? – Cerad Jan 19 '21 at 13:28
  • Yes, it shows me all the routes. Also, didn't have any errors when I ran composer to install packages. – Etereal Jan 19 '21 at 15:19
  • So it is probably a web server configuration issue. If you are using apache then maybe you need an .htaccess file. If you have not already, read through the docs on deployment. Lots of possible blocking points. – Cerad Jan 19 '21 at 16:07
  • try executing composer require "symfony/apache-pack". Or did you already install it? – Nel Jan 19 '21 at 17:44

0 Answers0