【问题标题】:Laravel App error 503 after deployed to EC2部署到 EC2 后 Laravel App 错误 503
【发布时间】:2021-06-10 08:44:52
【问题描述】:

我有 laravel 应用程序。当我在本地主机服务器上运行时,它可以正常工作。但是当我部署到 EC2 实例时..它正常工作,直到我登录..和登录后..我收到以下错误

我仍然不明白我的申请出了什么问题。我尝试在服务器上打开错误日志,错误日志如下图所示:

Fast CGI 可能有问题.. 但我还没有解决这个问题。 反正我的EC2类型是t3a.nano,有没有可能导致这个错误。

希望你们能帮助我。我在将近 2 天的时间里一直在寻找有关此错误的解决方案。 提前致谢

【问题讨论】:

  • 您使用什么服务器?并添加有问题的配置文件
  • @Kamlesh Iam 使用 apache,但安装了 bitnami 包。你指的是哪个配置文件@kamlesh?
  • 在你安装的服务器上bitnami package这是windows服务器吗?
  • 不只是 Debian Linux
  • 哦,我以前手动安装php,ngiinx,mysql,composer不知道bitnami package

标签: php laravel apache amazon-ec2 fastcgi


【解决方案1】:

也许这个问题可以通过缓存清理来解决

php artisan cache:clear

有时这个命令不会给出结果。然后你可以试试这个 bash 脚本:

#!/bin/bash
rm -r /your_site_dir/storage/framework/cache/data/*
rm -r /your_site_dir/storage/framework/views/*

【讨论】:

  • 我已经尝试在 chrome 上按 ctrl + F5 但它仍然无法正常工作谢谢@Андрей Беспалов
  • 我的意思是 laravel 缓存。请在您的网站根目录执行此命令: php artisan cache:clear && php artisan route:clear && php artisan view:clear
  • 我已经尝试过这样做php artisan cache:clear && php artisan route:clear && php artisan view:clear,但还是不行
  • 它显示此错误cannot remove 'storage/framework/cache/data/*': No such file or directory
猜你喜欢
  • 1970-01-01
  • 2015-02-04
  • 2017-01-21
  • 1970-01-01
  • 2020-07-12
  • 2011-07-11
  • 2012-12-04
  • 2016-12-27
  • 1970-01-01
相关资源
最近更新 更多