Próbuję wrzucić projekt wykonany w Symfony 4 na Heroku.
Podążając zgodnie z tym tutorialem nie jestem w stanie wyświetlić prawidłowo żadnej strony.
Wyrzuca mi błąd typu:
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
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.
Po wywołaniu
heroku logs -t
Jest coś takiego:
2018-12-16T21:54:02.057519+00:00 heroku[router]: at=info method=GET path="/login" host=obydzialalo.herokuapp.com request_id=79382f2c-e513-4a8d-8491-a29549314c72 fwd="83.218.117.48" dyno=
web.1 connect=0ms service=2ms status=404 bytes=367 protocol=https
2018-12-16T21:54:02.251360+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=obydzialalo.herokuapp.com request_id=c488775c-4c41-4df6-b729-20a672ec06c5 fwd="83.218.117.48"
dyno=web.1 connect=0ms service=1ms status=404 bytes=373 protocol=https
2018-12-16T22:09:57.109908+00:00 app[api]: Running release v6 commands by user majorkuprich@gmail.com
2018-12-16T22:09:57.127948+00:00 app[api]: @ref:jawsdb-amorphous-24090 completed provisioning, setting JAWSDB_URL. by user majorkuprich@gmail.com
2018-12-16T22:09:57.127948+00:00 app[api]: Release v7 created by user majorkuprich@gmail.com
2018-12-16T22:09:57.109908+00:00 app[api]: Attach JAWSDB (@ref:jawsdb-amorphous-24090) by user majorkuprich@gmail.com
2018-12-16T22:09:57.687606+00:00 heroku[web.1]: State changed from up to starting
2018-12-16T22:09:58.880290+00:00 app[web.1]: Going down, terminating child processes...
2018-12-16T22:09:58.864399+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-12-16T22:09:58.958765+00:00 heroku[web.1]: Process exited with status 143
2018-12-16T22:10:01.705765+00:00 heroku[web.1]: Starting process with command `heroku-php-apache2`
2018-12-16T22:10:04.609066+00:00 app[web.1]: Optimizing defaults for 1X dyno...
2018-12-16T22:10:04.644342+00:00 app[web.1]: 4 processes at 128MB memory limit.
2018-12-16T22:10:04.653147+00:00 app[web.1]: Starting php-fpm...
2018-12-16T22:10:06.657175+00:00 app[web.1]: Starting httpd...
2018-12-16T22:10:06.926811+00:00 heroku[web.1]: State changed from starting to up
2018-12-16T22:10:07.134526+00:00 app[api]: Update JAWSDB by jawsdb by user jawsdb@addons.heroku.com
2018-12-16T22:10:07.524801+00:00 heroku[web.1]: Restarting
2018-12-16T22:10:07.652596+00:00 heroku[web.1]: State changed from up to starting
2018-12-16T22:10:07.134526+00:00 app[api]: Release v8 created by user jawsdb@addons.heroku.com
2018-12-16T22:10:08.613507+00:00 app[web.1]: Going down, terminating child processes...
2018-12-16T22:10:08.591278+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-12-16T22:10:08.710850+00:00 heroku[web.1]: Process exited with status 143
2018-12-16T22:10:13.353475+00:00 heroku[web.1]: Starting process with command `heroku-php-apache2`
2018-12-16T22:10:17.047145+00:00 app[web.1]: Optimizing defaults for 1X dyno...
2018-12-16T22:10:17.095066+00:00 app[web.1]: 4 processes at 128MB memory limit.
2018-12-16T22:10:17.105790+00:00 app[web.1]: Starting php-fpm...
2018-12-16T22:10:19.325582+00:00 heroku[web.1]: State changed from starting to up
2018-12-16T22:10:19.113954+00:00 app[web.1]: Starting httpd...
2018-12-16T22:11:18.754469+00:00 heroku[web.1]: Restarting
2018-12-16T22:11:18.773273+00:00 heroku[web.1]: State changed from up to starting
2018-12-16T22:11:18.274926+00:00 app[api]: Set DATABASE_URL config vars by user majorkuprich@gmail.com
2018-12-16T22:11:20.046870+00:00 app[web.1]: Going down, terminating child processes...
2018-12-16T22:11:20.026364+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-12-16T22:11:20.185491+00:00 heroku[web.1]: Process exited with status 143
2018-12-16T22:11:18.274926+00:00 app[api]: Release v9 created by user majorkuprich@gmail.com
2018-12-16T22:11:24.703716+00:00 heroku[web.1]: Starting process with command `heroku-php-apache2`
2018-12-16T22:11:28.624790+00:00 app[web.1]: Optimizing defaults for 1X dyno...
2018-12-16T22:11:28.674856+00:00 app[web.1]: 4 processes at 128MB memory limit.
2018-12-16T22:11:28.708082+00:00 app[web.1]: Starting php-fpm...
2018-12-16T22:11:30.715628+00:00 app[web.1]: Starting httpd...
2018-12-16T22:11:31.165504+00:00 heroku[web.1]: State changed from starting to up
2018-12-16T22:12:06.758826+00:00 app[api]: Starting process with command `php bin/console cache:clear` by user majorkuprich@gmail.com
2018-12-16T22:12:12.455335+00:00 heroku[run.5526]: Awaiting client
2018-12-16T22:12:12.474783+00:00 heroku[run.5526]: Starting process with command `php bin/console cache:clear`
2018-12-16T22:12:19.969282+00:00 heroku[run.5526]: State changed from up to complete
2018-12-16T22:12:19.948289+00:00 heroku[run.5526]: Process exited with status 0
2018-12-16T22:12:28.419507+00:00 app[web.1]: [Sun Dec 16 22:12:28.418707 2018] [autoindex:error] [pid 136:tid 139940523542272] [client 10.45.211.114:34102] AH01276: Cannot serve director
y /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2018-12-16T22:12:28.423783+00:00 app[web.1]: 10.45.211.114 - - [16/Dec/2018:22:12:28 +0000] "GET / HTTP/1.1" 403 209 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/2010010
1 Firefox/64.0
2018-12-16T22:12:28.654177+00:00 app[web.1]: 10.45.211.114 - - [16/Dec/2018:22:12:28 +0000] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Ge
cko/20100101 Firefox/64.0
2018-12-16T22:12:28.654033+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=obydzialalo.herokuapp.com request_id=e2982879-3526-4ab9-bba2-edb83769ce26 fwd="83.218.117.48"
dyno=web.1 connect=0ms service=1ms status=404 bytes=373 protocol=https
2018-12-16T22:12:32.114106+00:00 heroku[router]: at=info method=GET path="/login" host=obydzialalo.herokuapp.com request_id=495324d8-ebb3-4653-aaa3-fc9ece3a67b3 fwd="83.218.117.48" dyno=
web.1 connect=0ms service=3ms status=404 bytes=367 protocol=https
2018-12-16T22:18:08.095005+00:00 app[api]: Running release v10 commands by user majorkuprich@gmail.com
2018-12-16T22:18:08.095005+00:00 app[api]: Attach JAWSDB_NAVY (@ref:jawsdb-deep-18505) by user majorkuprich@gmail.com
2018-12-16T22:18:09.152816+00:00 heroku[web.1]: Restarting
2018-12-16T22:18:09.174010+00:00 heroku[web.1]: State changed from up to starting
2018-12-16T22:18:08.119005+00:00 app[api]: @ref:jawsdb-deep-18505 completed provisioning, setting JAWSDB_NAVY_URL. by user majorkuprich@gmail.com
2018-12-16T22:18:08.119005+00:00 app[api]: Release v11 created by user majorkuprich@gmail.com
2018-12-16T22:18:10.286373+00:00 app[web.1]: Going down, terminating child processes...
2018-12-16T22:18:10.259519+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-12-16T22:18:10.387301+00:00 heroku[web.1]: Process exited with status 143
2018-12-16T22:18:15.403698+00:00 heroku[web.1]: Starting process with command `heroku-php-apache2`
2018-12-16T22:18:18.082389+00:00 app[api]: Update JAWSDB_NAVY by jawsdb by user jawsdb@addons.heroku.com
2018-12-16T22:18:19.594410+00:00 app[web.1]: Optimizing defaults for 1X dyno...
2018-12-16T22:18:19.636057+00:00 app[web.1]: 4 processes at 128MB memory limit.
2018-12-16T22:18:19.648079+00:00 app[web.1]: Starting php-fpm...
2018-12-16T22:18:21.656931+00:00 app[web.1]: Starting httpd...
2018-12-16T22:18:21.855028+00:00 app[web.1]: Going down, terminating child processes...
2018-12-16T22:18:21.831893+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-12-16T22:18:21.990857+00:00 heroku[web.1]: Process exited with status 143
2018-12-16T22:18:24.064067+00:00 heroku[web.1]: Starting process with command `heroku-php-apache2`
2018-12-16T22:18:27.464702+00:00 app[web.1]: Optimizing defaults for 1X dyno...
2018-12-16T22:18:27.507735+00:00 app[web.1]: 4 processes at 128MB memory limit.
2018-12-16T22:18:27.521502+00:00 app[web.1]: Starting php-fpm...
2018-12-16T22:18:29.918247+00:00 heroku[web.1]: State changed from starting to up
2018-12-16T22:19:55.118149+00:00 app[api]: Starting process with command `php bin/console cache:clear` by user majorkuprich@gmail.com
2018-12-16T22:20:01.747584+00:00 heroku[run.9824]: State changed from starting to up
2018-12-16T22:20:01.901755+00:00 heroku[run.9824]: Starting process with command `php bin/console cache:clear`
2018-12-16T22:20:01.856193+00:00 heroku[run.9824]: Awaiting client
2018-12-16T22:20:12.481356+00:00 heroku[run.9824]: State changed from up to complete
2018-12-16T22:20:12.462316+00:00 heroku[run.9824]: Process exited with status 0
2018-12-16T22:20:28.000000+00:00 app[api]: Build started by user majorkuprich@gmail.com
2018-12-16T22:20:45.304751+00:00 heroku[web.1]: State changed from up to starting
2018-12-16T22:20:46.407468+00:00 app[web.1]: Going down, terminating child processes...
2018-12-16T22:20:46.378129+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-12-16T22:20:46.496774+00:00 heroku[web.1]: Process exited with status 143
2018-12-16T22:20:45.026215+00:00 app[api]: Release v13 created by user majorkuprich@gmail.com
2018-12-16T22:20:45.026215+00:00 app[api]: Deploy 234f942e by user majorkuprich@gmail.com
2018-12-16T22:20:46.000000+00:00 app[api]: Build succeeded
2018-12-16T22:20:57.144644+00:00 app[web.1]: DOCUMENT_ROOT changed to 'public/'
2018-12-16T22:20:57.297898+00:00 app[web.1]: Optimizing defaults for 1X dyno...
2018-12-16T22:20:59.446215+00:00 app[web.1]: Starting httpd...
2018-12-16T22:20:59.812806+00:00 heroku[web.1]: State changed from starting to up
2018-12-16T22:21:01.434162+00:00 app[web.1]: 2018-12-16T22:21:01+00:00 [error] Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "G
ET /"" at /app/vendor/symfony/http-kernel/EventListener/RouterListener.php line 139
2018-12-16T22:21:01.910240+00:00 app[web.1]: 10.79.217.135 - - [16/Dec/2018:22:21:01 +0000] "GET / HTTP/1.1" 404 471 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/2010010
1 Firefox/64.0
2018-12-16T22:21:02.128264+00:00 app[web.1]: 2018-12-16T22:21:02+00:00 [error] Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "G
ET /favicon.ico"" at /app/vendor/symfony/http-kernel/EventListener/RouterListener.php line 139
2018-12-16T22:21:02.152497+00:00 app[web.1]: 10.79.217.135 - - [16/Dec/2018:22:21:02 +0000] "GET /favicon.ico HTTP/1.1" 404 471 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Ge
cko/20100101 Firefox/64.0
2018-12-16T22:21:05.789943+00:00 app[web.1]: 2018-12-16T22:21:05+00:00 [critical] Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\EnvNotFoundException: "Environmen
t variable not found: "APP_SECRET"." at /app/vendor/symfony/dependency-injection/EnvVarProcessor.php line 77
2018-12-16T22:21:05.799599+00:00 app[web.1]: 10.69.9.74 - - [16/Dec/2018:22:21:05 +0000] "GET /login HTTP/1.1" 500 495 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100
101 Firefox/64.0
2018-12-16T22:21:05.799883+00:00 heroku[router]: at=info method=GET path="/login" host=obydzialalo.herokuapp.com request_id=cc0a1f9d-dab1-478e-bffa-f871429c662b fwd="83.218.117.48" dyno=
web.1 connect=0ms service=70ms status=500 bytes=719 protocol=https
Mój plik .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
# Determine the RewriteBase automatically and set it as environment variable.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
# Rewrite all other queries to the front controller.
RewriteRule .? %{ENV:BASE}/index.php [L]
</IfModule>
Plik Procfile:
web: $(composer config bin-dir)/heroku-php-apache2 public/