I've deployed a laravel app to a shared host. All my files are sitting within the public_html folder, including an .env file which contains my database credentials. According to some articles I've read online, the public_html folder is somehow accessible to malicious users...how is that possible and how can I protect it ?
In project/public/index.php
Look for the following:
require __DIR__.’/../bootstrap/autoload.php’;
$app = require_once __DIR__.’/../bootstrap/app.php’;
And Update them to:
require __DIR__.’/../project/bootstrap/autoload.php’;
$app = require_once __DIR__.’/../project/bootstrap/app.php’;
You Might Face problems running composer unless you are uploading the vendors directory.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.