1 year ago

Hosting on Shared Server Best Practice

Posted 1 year ago by danielec81

Hi, I would like a couple of advices about hosting Laravel on a Shared Server.

I've seen there are some methods, but I would like to better understand which could be preferred.

The method I've found are:

  1. Using .htaccess to change the Document Root through RewriteRule (es https://stackoverflow.com/a/25119567 )
  2. Clone the Repo in a not public folder, copy /public/ content in the public_www folder (or the name on the shared server) anche fix the path in index.php of the two "require" commands.
  3. If the Shared Host use Symbolic link for public directory (es cPanel create a directory named public_www, anche a symbolic link www => public_www ) use SSH to login the server, change the link to the public folder of the laravel application.

I think that there are pros and cons on every point, but I would like some skilled opinions!!

Please sign in or create an account to participate in this conversation.