question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No route found for "GET /" error with Symfony 4.0.4

See original GitHub issue

I followed steps mentioned in following guide to setup new api-platform project. https://api-platform.com/docs/distribution#using-symfony-flex-and-composer-advanced-users Only difference is that im using my own virtual host instead of built in php server.

But Im getting No route found for "GET /" error. api-platform-error

I also tested it by installing the symfony only and I was able to see symfony welcome page successfully. but as soon as I install api-platform and visit the page, I get above mentioned error.

Further details:

api-platform:  v2.2.2
symfony: v4.0.4
PHP: 7.1
Server: Apache2
OS: ubuntu

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
tahirmcommented, Feb 26, 2018

Turns out I was missing proper rewrite rules, which I got by installing composer require symfony/apache-pack as mentioned in symfony docs:

https://symfony.com/doc/current/setup/web_server_configuration.html

After this, I was able to access api-platform on /api

@antograssiot, Thank you very much for pointing me to right direction.

2reactions
antograssiotcommented, Feb 26, 2018

did you try bin/console debug:router ? I did follow those steps and the base route is /api

see your config/routes/api-platform.yaml

Read more comments on GitHub >

github_iconTop Results From Across the Web

Symfony 4.4 - "No route found for "GET /"" - Stack Overflow
On local, the application works without any issues. It happens only on the host where I deploy the Symfony application. Cache has been...
Read more >
Error post install: No route found for "GET /" (solved) | Drupal.org
I have completed a Drupal install and it starts in a broken state. I used composer for the install but made some changes...
Read more >
Symfony 4 : No route found for "GET /" - Google Groups
I run "composer create-project symfony/website-skeleton project_name"; I installed server and run it with "php bin/console server:run"; I got the error "No ...
Read more >
Routing doesn`t work - Symfony app - DigitalOcean
Hi, I am trying to deploy my Symfony app to the Digital Ocean. The problem is with routing - the app cannot find...
Read more >
Can't restore existing site (no route found for "GET /")
The website encountered an unexpected error. Please try again later. Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found