danielec81
225
21
Tips

Hosting on Shared Server Best Practice

Posted 7 months 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.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.