I'm trying to deploy my Laravel application on Heroku but the assets that are in public folder aren't loading.
Application url: https://drinkco.herokuapp.com
I'm already trying to force https on AppServiceProvider with the code:
if(env('REDIRECT_HTTPS')) {
$this->app['request']->server->set('HTTPS', true);
}
Procfile configuration : web: vendor/bin/heroku-php-nginx -C nginx.conf public/
The files are beeing generated by npm run prod
使用这个:
web: vendor/bin/heroku-php-apache2 public/
You should check to see if you included the assets folder inside of your .gitignore
file.
If you do not want to track changes to this folder, which you shouldn't, you can include it back to your .gitignore
file after deploying to heroku
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.