problem with Routes Laravel 7.0 shared hosting

Asked

Viewed 179 times

-1

Oops! First your lay half still in the Aravel I was able to put in production (shared server Cpanel Locaweb) but I work in parts the index stay top consulting the bank using multTenant so as other routes does not work. I thought it was something related to Tenant’s Middleware, but not because I did a route returning a direct (for testing of course rs) and isolated from Middleware but unsuccessfully my structure left so Laravel folder at the root of the hosting (/) and the public files inside public_html I changed the necessary files of index.php and serve.php.

but I noticed something that I can’t tell if it’s right or I can’t put anything in the server.php it doesn’t change anything in the project I put up to a dd(); inside it doesn’t even enter inside it.

resources used: Shared Cpanel Locaweb server without SSH/terminal access Laravel 7.0, mysql, PHP 7.2 (ea-php72)

would you have any idea what’s going on or if it was some mistake of my own? or another way of doing

1 answer

0

You should point to the root folder of the project being the /public. There must be some option within Cpanel to define which root folder.

If not, you can move the files from the folder public to the public_html. For this, you simply drag and the paths within the files, such as the path within Index.php

require __DIR__.'/../vendor/autoload.php';

should be changed to:

require __DIR__.'/vendor/autoload.php';

You must change the path of all the files you move

Browser other questions tagged

You are not signed in. Login or sign up in order to post.