Laravel 4 NotFoundHttpException (LAMP)

Posted June 29, 2014 3.1k views


I need some help. I’ve been trying to get to my Laravel app without success. I’m seeing the NotFoundHttpException (Whoops there was an error).


DocumentRoot /opt/carsX_d/public
<Directory "/opt/carsX_d/public">
Options Indexes Includes FollowSymLinks MultiViews
Require all granted
AllowOverride All
Order allow,deny
Allow from all


<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews

    RewriteEngine On

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

Any suggestions?


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Have you enabled mode_rewrite ? Your .htaccess file requires it. Run:

sudo a2enmod rewrite

Thanks, yes, I’ve run that command.

“Module rewrite already enabled”

I did move the entire Laravel folder structure under /var/www/html and now it seems to work. But I will need a solution to lock down all the folders except Public.