Hi,
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
</IfModule>
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]
</IfModule>
Any suggestions?
Thanks.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.