Brand new Symfony 5 app not working in Heroku

I am trying to deploy to heroku an empty and recently created Symfony5 App and all I got is a 404 error:

Oops! An Error Occurred

The server returned a "404 Not Found".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

Here are the steps needed to reproduce it (just following the instructions):

$ symfony new heroku-symfony-test --full
$ cd heroku-symfony-test/

$ heroku create

$ echo 'web: heroku-php-apache2 public/' > Procfile
$ git add Procfile
$ git commit -m "Heroku Procfile"

$ heroku config:set APP_ENV=prod

$ git push heroku master

Then go to the deployed page and you will see the already mentioned error message.

Just for completeness, the logs:

2020-11-26T09:18:51.398606+00:00 app[web.1]: - - [26/Nov/2020:09:18:51 +0000] "GET / HTTP/1.1" 404 807 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36
2020-11-26T09:18:51.400339+00:00 heroku[router]: at=info method=GET path="/" request_id=fc2b6c8e-7a42-4edb-a3a7-6fdb7db555a0 fwd="" dyno=web.1 connect=1ms service=236ms status=404 bytes=1019 protocol=https
2020-11-26T09:18:51.671245+00:00 heroku[router]: at=info method=GET path="/favicon.ico" request_id=0aa7efa3-4256-4337-975f-79d9c36a8acc fwd="" dyno=web.1 connect=1ms service=2ms status=404 bytes=360 protocol=https
2020-11-26T09:18:51.672288+00:00 app[web.1]: - - [26/Nov/2020:09:18:51 +0000] "GET /favicon.ico HTTP/1.1" 404 196 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Thanks in advance!

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *