Laravel黑屏

Laravel黑屏,第1张

Laravel黑屏 阿帕奇

这个答案是否描述或帮助了您的情况?升级到Apache 2.4会对Apache配置进行一些更改。

拉拉韦尔

您在查看Laravel的日志还是Apache的日志?

自从升级到Laravel 4.1之后,当应用程序无法写入日志位置时,我遇到了白屏“错误”(WSOD)。我总是通过使app /
storage目录可被Apache写入(组可写入“ www-data”,“ apache”或世界可写入)来解决此问题,这取决于您的服务器设置。

Web服务器用户

在Ubuntu / Debian服务器上,您的PHP可能以“ www-data”用户身份运行。在CentOS / RedHat /
Fedora服务器上,您的PHP可能以“ apache”用户身份运行。

确保您的文件归运行PHP的用户所有:

# Debian/Ubuntu$ sudo chown -R www-data /path/to/laravel/files# CentOS/RedHat/Fedora$ sudo chown -R apache /path/to/laravel/files

请注意,您可能未以用户www-data或apache的身份运行。这取决于您的托管和设置!

Laravel 4
# Group Writable (Group, User Writable)$ sudo chmod -R gu+w app/storage# World-writable (Group, User, Other Writable)$ sudo chmod -R guo+w app/storage
Laravel 5+(包括6)
# Group Writable (Group, User Writable)$ sudo chmod -R gu+w storage# World-writable (Group, User, Other Writable)$ sudo chmod -R guo+w storage###### The bootstrap/cache directory may need writing to also### Group Writable (Group, User Writable)$ sudo chmod -R gu+w bootstrap/cache# World-writable (Group, User, Other Writable)$ sudo chmod -R guo+w bootstrap/cache


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5011937.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-14
下一篇 2022-11-15

发表评论

登录后才能评论

评论列表(0条)

保存