gpt4 book ai didi

Laravel nginx 权限问题

转载 作者:行者123 更新时间:2023-12-04 18:41:02 24 4
gpt4 key购买 nike

我已经根据 this tutorial 在 nginx 上安装了 laravel
.当我运行我的服务器 IP 地址时,会出现一个空白页。
这是 nginx 错误日志:

2016/09/15 12:40:59 [error] 2857#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/laravel/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied' in /var/www/laravel/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
Stack trace:
#0 /var/www/laravel/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array)
#1 /var/www/laravel/vendor/monolog/monolog/src/Monolog/Logger.php(336): Monolog\Handler\AbstractProcessingHandler->handle(Array)
#2 /var/www/laravel/vendor/monolog/monolog/src/Monolog/Logger.php(615): Monolog\Logger->addRecord(400, Object(UnexpectedValueException), Array)
#3 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Log/Writer.php(202): Monolog\Logger->error(Object(UnexpectedValueException), Array)
#4 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Log/Writer.php(113): Illuminate\Log\Writer->writeLog('error', Object(UnexpectedValueEx...
PHP message: PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/laravel/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied' in /var/www/laravel/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
Stack trace:
#0 /var/www/laravel/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array)

最佳答案

这个命令我确实遇到了同样的问题:php artisan storage:link ,我确实用命令 sudo 解决了在代码之前。像这样:
'sudo php 工匠存储:链接'。我相信如果你使用 sudo你将不再有这个问题。

关于Laravel nginx 权限问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39506303/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com