Installation Laravel 5.4 Locaweb [duplicate]

0

I developed a simple system using laravel 5.4 locally, I deployed on a shared server locaweb following the tutorials available in both locaweb and the net in a general, composer installation, php version change (using 7), installation of laravel.

However, after uploading my system, it is not working as it should, it does not find the css, js, and images files contained in the project. I tried several .htaccess to try to solve the problem but I still do not find an answer, the system is not in the root of the server, but in a folder, url: link

    
asked by anonymous 24.03.2017 / 18:08

2 answers

0

Most people like this do not seem to understand that Laravel's public folder should be the root of the HTTP server, which is why it causes a lot of problems, please read this:

It is quite likely that if your application is in a subfolder you will have to use CSS and JS like this:

<link href="../css/">

But if so, it will look in root:

<link href="/css/">

Absolute and relative paths

What you need to understand are absolute and relative paths:

11.08.2017 / 18:16
-1

In Hostinger, the host comes with a Public_html folder. In it you put all the files that stow in your project's public folder. out of the folder you create another folder with the name of your project and put the rest of the project in.

It looks like this:

-seu-projeto-de-estoque
  |_ app
  |_ vendor
  |_ public
  |_ ......
-public_html
  |_css
  |_fontes
  |_index.php
  |_ (todo conteúdo de dentro da pasta seu-projeto-de-estoque/public)

Within the public_html / index.php you will have to edit 2 lines of code.

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

and leave it like this:

require __DIR__.’/../seu-projeto-de-estoque/bootstrap/autoload.php’;
$app = require_once __DIR__.’/../seu-projeto-de-estoque/bootstrap/app.php’;

It worked for me on Hostinger, then I just needed to configure the .env file to set the database

    
11.08.2017 / 17:26