Laravel 5 Structure for document root, public_html and sub-folder/sub-directory based access on VPS and Shared Hosting
Date: 2017-Nov-20
It becomes really annoying when you have to deal with these age old shared hosting servers. Yeah they might have PHP 7, but that doesn't do any justice if we can't change the Document Root to the one needed by our project.
Learning through various places guides us to only put public
files in the web/public folder. Which means setting the Document Root. But many of our ugly old shared hosting sites like godaddy, hostgator etc. do not let us set this simple document root for our primary domain, yet they allow when you add sub-domains (??? confused :S). I wish we could simply change these hostings to some VPS like digitalocean, but alas, your company boss not interested to change hosting. So, yeah, dealing with this problem for ages. And I HATE IT!!
Many of us Laravel developers have somehow managed to run laravel in these shared hosting sites, but what we usually