Boa tarde, segui os passos para publicar symfony em heroku do link:
https://devcenter.heroku.com/articles/deploying-symfony4#prerequisites.
Mas, quando abro o app no heroku, ele apresenta a msg quando abro o app no heroku:
Sorry, the page you are looking for could not be found. Segue a lista de passos que executei:
composer create-project symfony/skeleton hero/
composer require symfony/apache-pack
echo "# hero" >> README.md
git init git add .
git commit -m "first commit"
git remote add origin https://github.com/vicnet81/hero.git
git push -u origin master
heroku create
echo 'web: heroku-php-apache2 public/' > Procfile
heroku config:set APP_ENV=prod
Substituir em public/index.php:
if ($trustedProxies = $SERVER['TRUSTEDPROXIES'] ?? $ENV['TRUSTEDPROXIES'] ?? false) { Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); }
Por:
$trustedProxies = $SERVER['TRUSTEDPROXIES'] ?? $ENV['TRUSTEDPROXIES'] ?? false; $trustedProxies = $trustedProxies ? explode(',', $trustedProxies) : []; if($SERVER['APPENV'] == 'prod') $trustedProxies[] = $SERVER['REMOTEADDR']; if($trustedProxies) { Request::setTrustedProxies($trustedProxies, Request::HEADER_X_FORWARDED_AWS_ELB); }
git add .
git commit -m "heroku"
git push heroku master
heroku open
Estou com:
- Windows 10
- PHP 7.3.8,
- git version 2.22.0.windows.1
- heroku/7.29.0 win32-x64 node-v11.14.0
Qual seria o problema?