简体   繁体   English

在数字海洋上使用Dokku的HTTP 500 Laravel 5应用

[英]HTTP 500 Laravel 5 app using dokku on digital ocean

So i followed the tutorial about deploying a larval 5 application using dokku and it worked but i have a HTTP ERROR 500 can't see any logs using dukku logs so i used 因此,我按照有关使用dokku部署幼虫5应用程序的教程进行了操作,但它工作正常,但是我有一个HTTP错误500,看不到任何使用dukku日志的日志,因此我使用

dokku run app /bin/bash

started another local server in the app directory and curl it to see in storage/logs 在应用程序目录中启动了另一个本地服务器,并将其卷曲以在存储/日志中查看

No supported encrypter found. 找不到支持的加密器。 The cipher and / or key length are invalid. 密码和/或密钥长度无效。

which mean the APP_KEY is incorrect (i have it in .ENV in my local env) but when i push to my VPS it remove the whole line 这意味着APP_KEY不正确(我在本地环境中的.ENV中有它),但是当我推送到VPS时,它会删除整行

using dokku run wizzserv php artisan key:generate result in 使用dokku run wizzserv php artisan key:generate结果

Application key [xxxxxxxxxxxxxxxxxxxxxxxxxxxx] set successfully.

but it's not working 但它不起作用

TL;DR TL; DR

pushed my code which work locally to Digital Ocean using dokku deployement succeed but getting HTTP 500 error about APP_KEY random string dokku remove it from .ENV 使用dokku部署将我的本地代码推送到Digital Ocean本地工作成功,但有关APP_KEY随机字符串dokku的HTTP 500错误得到删除。

i corrected it by just add 我通过添加来纠正它

dokku config:set MyApp APP_KEY=XXXXXXX

where i generated the xxxxxxx using dokku run AppName php artisan key:generate 我使用dokku run AppName php artisan key:generate生成xxxxxxx的dokku run AppName php artisan key:generate

now it's working 现在正在工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM