获取有关Laravel 5+的Ubuntu 14.04 500内部服务器错误 [英] Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
问题描述
我已经安装Laravel多次在Windows操作系统,但它从未发生过此类问题。这500内部服务器通常当你的mod_rewrite的模块没有开启时发生。
I have installed Laravel many times on Windows OS but it never occurred this type of problem. This 500 internal server usually occurs when your "mod_rewrite" module is not turned on.
然而,在Ubuntu 14.04这个问题让我头疼。我已经安装了rewrite_mod但它也不能正常工作。我已经给内即获得我的所有文件夹和文件。
However, on Ubuntu 14.04 this problem is giving me a headache. I have installed rewrite_mod but it's also not working. I've given access to all my folders and files inside i.e.
在/ var / www / html等/ laravel_project
/var/www/html/laravel_project
不过这是行不通的。由原来的改变的.htaccess以及这一点。
Still it doesn't work. Changed .htaccess as well from original to this.
+FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
我都需要Laravel 5+以及必要的扩展。有什么离开,我没有做什么?
I have all the necessary extensions needed for Laravel 5+ as well. Is there something left that I didn't do?
推荐答案
终于克服这个问题
- 这不是.htaccess文件是这样的问题,也不是index.php文件。问题是在访问文件和要求的权限。
为了解决这个问题我通过终端运行以下命令。
For solving the problem i ran the following commands through terminal.
sudo chmod 755 -R laravel_blog
,然后键入下面让laravel写入文件到存储文件夹
and then type below to allow laravel to write file to storage folder
chmod -R o+w laravel_blog/storage
这两个命令解决了这个问题。
This two commands solved the problem.
这篇关于获取有关Laravel 5+的Ubuntu 14.04 500内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!