问题描述
这是一个Laravel安装相关的问题。我有一个面向公众的Unix服务器设置:
It's a Laravel-install related question. I have a public-facing Unix server setup:
<VirtualHost *:80>
ServerAdmin [email protected]
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>
我可以为精文件输出/中无功/网络/ MYDOMAIN即包含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中,通过作曲家安装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
所以,当我浏览到:
So when I browse to:
http://mydomain.org/my-laravel-project/public/
为什么我的申请报告:
why does my application report:
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服务器组(通常为阿帕奇
或 www数据
,但可以在不同的操作系统之间变化),并保持权限的目录为 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可能需要一组权限来进行配置:文件夹
应用程序/存储内需要通过web服务器进行写访问。
这篇关于错误异常处理程序。 - Laravel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!