在 aws 中部署 Laravel 应用程序时出现 500 服务器错误 [英] 500 Server Error when deploying laravel app in aws
问题描述
我已经尝试解决这个错误 2 周了,但还没有解决.
I have been trying to resolve this error for 2 weeks but have not resolve yet.
我已经使用了与此问题相关的所有答案,但没有找到任何适合我的问题的解决方案:(
I have used all answers related to this issue but have not find any suitable solution for my problem :(
使用过的命令
chmod -R o+w laravel_blog/storage
sudo chmod -R 755 laravel_blog
php artisan key:generate
php artisan cache:clear
php artisan config:clear
sudo chown -R www-data:www-data ./storage
请帮帮我 ||
推荐答案
在 Laravel 根文件夹中检查您的
.env
文件:
a) 检查您是否有 .env
文件,如果没有,将 .env.example
复制粘贴到 .env
a) Check if you have .env
file , if not copy-paste .env.example
to .env
b) APP_DEBUG = true
(部署到服务器时,在检查您的应用程序后 - 更改为 false)
b) APP_DEBUG = true
(when deploying to a server, after checking your app - change on false)
c) APP_KEY =
(必须为空)
d) 保存 .env
文件
e) 运行 php artisan key:generate
f) 打开您的网站(所有其他错误服务器返回)
f) Open your website (all another errors server return)
运行 composer install
这篇关于在 aws 中部署 Laravel 应用程序时出现 500 服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!