I have a Laravel installation on my shared hosting plan and they use CPanel.
When I set up the domain, I pointed it’s document root to the Laravel public folder, and everything seems to be working okay.
Is this good practice? I’ve been told that it’s not good to put it in the public_html folder at all, but if the server is only serving documents for that domain out of the public folder, is that the same thing as having it outside of the public_html folder?
I’ve set the domain up in cPanel to serve out of the /home/user/public_html/site.com/public.
I just want to make sure that it’s secure.
Put all your files in /home/user, then put the contents of ‘public’ in /home/user/public_html and change $paths[‘public’] in the bootstrap/paths.php file to reflect this, as below: