Dp ĚN Dp ĚN - 2 years ago 276
PHP Question

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

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.


Still it doesn't work. Changed .htaccess as well from original to this.

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 Source

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 755 -R 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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download