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
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.
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.
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)
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();
header("Location: http://www.cota.mydomain.com/public/index.php"); die();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.