Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04

DpEN picture DpEN · Jul 21, 2015 · Viewed 334.1k times · Source

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.

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

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]

I have all the necessary extensions needed for Laravel 5+ as well. Is there something left that I didn't do?

Answer

DpEN picture DpEN · Jul 22, 2015

Finally Overcame the problem

  • It was not the .htaccess file that was the problem nor the index.php. The problem was on accessing the files and requiring permissions.

For solving the problem i ran the following commands through terminal.

sudo chmod -R 755 laravel_blog

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.