I need to deploy a laravel 5 project to a client host.
The plan of my client is basic hosting: Linux + MySql without cpanel or similar (i.e. no admin panel).
edit require __DIR__.'/../bootstrap/autoload.php';
into require __DIR__.'/protected/bootstrap/autoload.php';
also edit $app = require_once __DIR__.'/../bootstrap/app.php';
into $app = require_once __DIR__.'/protected/bootstrap/app.php';
If you are trying to run Laravel 5.1 into a shared hosting space or you are trying to put your laravel 5/5.1 into a sub directory on your shared hosting so you can access it like this:
http://mywebsite.com/mylaravel/
So this answer is for you, first of all make sure you meet
Laravel 5.1 requirements :
- PHP 5.5
- PHP extension Mcrypt
- PHP extension Mbstring
- PHP extension OpenSSL
Here two tutorials for you :
Link 1
Link 2
UPDATE
This is a risky process. By using this, you give malicious users permissions to find bugs. like, http://project-url/storage/logs/laravel.log is still open.
Previous Answer:
Those who hardly check the comments,
@Andrew F. has already given the answer.
but he missed some other files like composer and package.
Formatted answer is:
RewriteRule ^(server\.php|gulpfile\.js|\.env|composer.*|package.*) - [F,L,NC]
There is no difference between L4 and L5, so do the same thing you did for L4.