Deploy Laravel 5 to blocked DocumentRoot with only two folders: private and public

Posted 3 years ago by henrique-ferrolho

Alright, sorry if the title was confusing... Here is a more clear explanation:

I need to deploy a Laravel 5 project but I don't have write access to the DocumentRoot. The DocumentRoot has two folders: private and public, and I do have read/write access to these folders.
So, basically, I need to move every folder except the Laravel public folder, to the private folder. I have already done that and I have edited the following lines in public/index.php:

require __DIR__.'/../private/bootstrap/autoload.php';
$app = require_once __DIR__.'/../private/bootstrap/app.php';

However, when I run php artisan serve, I get the following error:

chdir(): No such file or directory (errno 2)

Thanks in advance!

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

Reply to

Use Markdown with GitHub-flavored code blocks.