Support the ongoing development of Laravel.io →
Configuration Requests
Last updated 2 years ago.
0
Solution

You should set your document root to laravel/public rather than use .htaccess to patch around that, otherwise all of laravels files as well as the app/storage/sessions will be available to the public web.

An alternative to changing your document root (if you don't have access to) is to install laravel above the document root (say your home folder) copy the contents of the public folder into your document root and edit the require paths in index.php and bootstrap/paths.php accordingly.

Either method will both fix your problem and install laravel securely.

Last updated 2 years ago.
0

Excellent answer.

Problem solved.

Thank you!

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

guest19 guest19 Joined 13 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.