Reputation: 1009
I am trying to deploy my laravel application on a shared hosting. It should be deployed in www.subdomain.something.com
My folder structure is:
/laravel
app/
vendor/
bootstrap/
server.php
artisan
composer.json
composer.lock
phpunit.xml
/public_html
subdomain/
index.php
My index.php have the following paths:
require '/../../laravel/bootstrap/autoload.php';
$app = require_once '/../../laravel/bootstrap/start.php';
My paths.php
'app' => __DIR__.'/../../laravel/app',
'public' => __DIR__.'/../../public_html/subdomain',
'base' => __DIR__.'/../../laravel',
'storage' => __DIR__.'/../../laravel/app/storage',
Can anyone see what I am missing? I tried google, and found a bunch of step-by-step explanations but nothing seems to work - It results in a 500 internal server error.
Thanks for any feedback
Wesley
Upvotes: 4
Views: 5285
Reputation: 2307
I tried to deploy my first Laravel 8 application on shared hosting on DreamHost, and did encounter some issues.
header("Location: http://www.cota.mydomain.com/public/index.php"); die();
Upvotes: 0
Reputation: 675
Follow the first rule here.
If you use the first rule then everything should work fine. But somehow if you face 500 Internal Server Error
then login to ur server public_html
directory through ssh
and give the following command.
sudo chmod 755 -R laravel
chmod -R o+w laravel/storage
Here laravel
is your Laravel project directory.
Upvotes: 2
Reputation: 1641
I was having similar problem and found the solution.Maybe someone can get help with this,
Install LARAVEL 5 Locally Same as Share Hosting Directory (Deploy L5 Share Hosting Solution)
Upvotes: 0
Reputation: 722
Make sure you have write permissions to app/storage/
and all the sub directories. This sounds like the culprit but if not then see if you get any errors in the app/storage/logs
dir. If not see if you can parse the server logs.
Upvotes: 0