1
I’m trying to host my site developed in Laravel on the website hosting (Locaweb), but an error (HTTP ERROR 500) is preventing the operation.
File structure:
http://i.imgur.com/Ncg8bsl.png
Version of php: PHP Version 5.6.14
I modified the public/index.php
//require __DIR__.'/../bootstrap/autoload.php';
require __DIR__.'/../core/bootstrap/autoload.php';
//$app = require_once __DIR__.'/../bootstrap/app.php';
$app = require_once __DIR__.'/../core/bootstrap/app.php';
.htaccess (is the standard of Laravel)
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
After these changes, this error appears to me:
A página de xxx.com.br não está funcionando
xxx.com.br não consegue atender a esta solicitação no momento.
HTTP ERROR 500
Use Locaweb as hosting, and also set up core folder and subfolders as 777 permission.
ps. Locally everything works.
if you take out htaccess it works? ( at least for error 500 and goes from error on your system ? )
– Jasar Orion
I already had a problem with Laravel on the server, and it was because of the public_html/index.php permission, I set it to 644 and it worked, see if it works in your case.
– Flavio Misawa
How did you "install" the Windows on the server? Did you copy and paste the files? If you did so the Aravel must be with the unadjusted autoloader and need the Composer to correct this. I have suffered a lot installing Composer in the shared hosting of Ocaweb and I hope that they have improved this part.
– Rafael Mena Barreto
the folder is already set to 644. I can access the images, css’s (all within public_html) even with or without . htaccess.
– denalioasis
@Rafael Yes, I copied and pasted. Is there anything I can do?
– denalioasis
You have set up the Laravel website home folder on
public
?– novic
Yes, you have to install Composer, delete the vendor folder and run a Composer install. Another thing I noticed now, is that you are using the public_html folder (default Locaweb) and the Laravel saves the data in the public folder so it is another configuration that has to be done.
– Rafael Mena Barreto
Don’t forget to give write permission in folder
storage
also– Amanda Lima
@Virgilionovic I did not configure. Is there any tutorial to do this?
– denalioasis
@denalioasis Laravel by default is start by folder
public
if the server has no way to configure the site really does not work and so I know the said server does not have it.– novic