You should ask your hosting provider about this. Even if they won't give you access to the parent directory, they should be able to create a subdirectory and point your domain there instead (so that your top level directory isn't publicly visible anymore).
.env and security
Hi !
I'm working on my first laravel project and i'm currently deploying it.
I'm on a shared hosting, and i cannot access higher than public on the ftp.
How can i secure everything outside the laravel public directory ? ( mostly the .env ) For the moment, i just restricted rw rights.
Do you have further information on this ?
EDIT :
There are many projects on this shared hosting, my path looks like :
/path/to/app/ public /routes
The app is in a subfolder containing other projects, and upper folder contains different things like company website, blog, demos...
If your hosting package doesn't give you the option to create your own subdomain or set it the way Nash offered, now might be the right time to switch to a private server like a VPS.
Especially since you mention your project/package being a company site with different things, the company should really invest in an infrastructure to suit their needs.
Please or to participate in this conversation.