异常处理程序出错.- Laravel [英] Error in exception handler. - Laravel

查看:22
本文介绍了异常处理程序出错.- Laravel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个 Laravel 安装相关的问题.我有一个面向公众的 Unix 服务器设置:

It's a Laravel-install related question. I have a public-facing Unix server setup:

<VirtualHost *:80>
ServerAdmin webmaster@mydomain.org
DocumentRoot "/var/www/mydomain"
ServerName mydomain.org
ServerAlias www.mydomain.org
ErrorLog "/var/log/mydomain.org-error_log"
CustomLog "/var/log/mydomain.org-access_log" common
</VirtualHost>

我可以很好地提供/var/www/mydomain 之外的文档,即 http://mydomain.org/test.php 与 test.php 包含:

I can serve documents fine out of /var/www/mydomain i.e. http://mydomain.org/test.php with test.php containing:

<?php echo 'test';

工作正常.

在 bash 中,通过 Composer 安装 Laravel 并查看文件:

In bash, with Laravel installed through Composer and looking at the files:

# ls /var/www/mydomain/my-laravel-project

.gitattributes  CONTRIBUTING.md artisan         composer.json   phpunit.xml readme.md       vendor
.gitignore      app             bootstrap       composer.lock   public          server.php

所以当我浏览到:

http://mydomain.org/my-laravel-project/public/

为什么我的申请报告:

Error in exception handler. 

在浏览器中 - 在空白的白色屏幕上?我期待看到 Laravel 启动画面.

in the browser - on a blank white screen? I'm expecting to see the Laravel splash screen.

此外,日志文件也没有显示任何内容.

Moreover, the log files don't reveal anything either.

推荐答案

更安全的选择是将存储目录组更改为您的 Web 服务器组(通常为 apachewww-data,但这可能因不同的操作系统而异)并将目录的权限保持为 775.

The safer option would be to change the group of the storage directories to your web servers group (usually apache or www-data, but this can vary between the different operating systems) and keep the permissions as of the directory as 775.

chgrp -R www-data app/storage

或者使用 chown.

chown -R :www-data app/storage

然后确保目录权限为775.

chmod -R 775 app/storage

来自 Laravel 网站:

Laravel 可能需要配置一组权限:文件夹在应用程序/存储中需要 Web 服务器的写访问权限.

Laravel may require one set of permissions to be configured: folders within app/storage require write access by the web server.

这篇关于异常处理程序出错.- Laravel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆