nickL
nickL

Reputation: 1576

Install Laravel on Sub Domain has Http 500 error

Having some real problems installing a Laravel App on a Bluehost[ed] subdomain. I get a 500 error and checked a number of web-resources and tutorials.

Here's what I've tried:

A) A simple FTP of the MyGreatApp to the main domain root, copying the MyGreatApp public folder in the public_html/subDomainName/ as suggested by "Deploy Laravel To Shared Hosting The Easy Way" (but with sub domain thoughts) https://www.youtube.com/watch?v=6g8G3YQtQt4

But I get a http 500 error.

B) A similar method using SSH and cloning a git repository which contains the Laravel boiler plate.

In each case the boilerplate Laravel app doesn't run. I can echo out of the index.php to let me know what I get to in the PHP.

Many tutorials suggest changing the paths (for subdomains) in the index.php file too as the public folder of the subdomain is buried differently to the public_html of the main domain.

We are using PHP 7.1 on bluehost and Laravel 7

Any thoughts to get a stage beyond the 500 error?

EDIT: The error is thrown after attempting to execute this part of the code...

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

Upvotes: 0

Views: 837

Answers (2)

nickL
nickL

Reputation: 1576

We figured it out. It related to a problem with the dev PHP environment and the prod. PHP environment. PHP(Dev) > PHP(Prod) and a version issue in Symfony. When we downgraded Symfony to the "right" level of PHP it's fine.

Upvotes: 0

Irfan
Irfan

Reputation: 156

  • Delete everything (backup the important files, I'm not responsible for any data loss)
  • Create folder laravelapp or whatever you want
  • Upload your laravel project to that folder
  • Create new subdomain and point to public_html/laravelapp/public

Upvotes: 0

Related Questions