无法在托管中访问laravel

时间:2017-10-12 05:39:13

标签: php laravel laravel-5 laravel-5.2

我尝试在byehost中托管应用程序laravel,但是当我访问" 哎呀,看起来出错了时出现问题。"。

env文件内容:

APP_ENV=local APP_DEBUG=true APP_KEY=base64:nprtp1ROnlQoqIWKGp6MefyMwy8X0Oy/nczEbeBzaHo= APP_URL=http://localhost

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=DB_SAMPLE DB_USERNAME=root DB_PASSWORD=

CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379

MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null

2 个答案:

答案 0 :(得分:0)

You also need to generate an app key. Simply run php artisan key:generate to generate the key locally, and simply copy it over to your .env file on hosting.

答案 1 :(得分:0)

获取存储文件夹的权限

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache