Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/298.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Codeanywhere DevBox-Laravel给出500个错误_Php_Apache_.htaccess_Ubuntu_Laravel - Fatal编程技术网

Php Codeanywhere DevBox-Laravel给出500个错误

Php Codeanywhere DevBox-Laravel给出500个错误,php,apache,.htaccess,ubuntu,laravel,Php,Apache,.htaccess,Ubuntu,Laravel,我设置了我从Codenaywhere获得的免费DevBox(Ubuntu,PHP),并遵循了Laravel站点上的安装说明 我在根目录中设置了一个htaccess,这样当我进入域时它就指向/public 我得到了一个500错误,但当我在公共场合输入和index.html文件时,它起了作用。似乎它不喜欢index.php 为什么会出现此错误?使其正常工作,必须设置正确的权限 sudo find./-type d-exec chmod 755{}; sudo find./-type f-exec c

我设置了我从Codenaywhere获得的免费DevBox(Ubuntu,PHP),并遵循了Laravel站点上的安装说明

我在根目录中设置了一个
htaccess
,这样当我进入域时它就指向/public

我得到了一个500错误,但当我在公共场合输入和
index.html
文件时,它起了作用。似乎它不喜欢index.php


为什么会出现此错误?

使其正常工作,必须设置正确的权限

sudo find./-type d-exec chmod 755{};
sudo find./-type f-exec chmod 644{};
sudo chown-R www-data:www-data-public


如果您使用的是apache,请检查
/var/log/apache2/error.log(或等效文件)的内容,查看您的web服务器是否抛出错误。另外,请尝试在命令行上运行
apachectl configtest
,查看您的httpd配置文件是否良好。结果表明,这是我对
存储
目录的权限,只是需要确保您已启用写访问权限。我还必须更新
/etc/apache2/sites enabled/000 default.conf
以指向公共文件夹作为
DocumentRoot
@vonec-Yup,我现在总是需要做
chmod-R 777存储