It's my first upload to a remote server of a Laravel site.
Local I have configured a vhost so my access to my site is like:
site.domain.com //it's pointing htdocs/laravel-proyect/public
I have uploaded my site to my remote server, then:
- Change permisions on storage and all its directories
- Change permisions to bootstrap
Change configuration of app.php
'url' => 'http://site.domain.com',
Change configuration in database.app with new parameters (as well as in email.php)
- Load all tables and data in the data base
Then I try to load my site and get a 500 Internal Server Error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
It works a little, I have this code in routes.php:
// Begins in the login view
Route::get('/', function()
{
if (!Sentry::check()) {
$data = array();
if (Session::has('email')) {
$data = array('email' => Session::get('email'));
}
return Redirect::route('login', $data);
}
else
return Redirect::route('users');
});
/ ========================================
// LOGIN, LOGOUT AND ACTIVATION SECTION ==========
// // ============================================
// show the login page
Route::get(MyHelpers::textLang('login','routes'), array('as' => 'login', function()
{
if (Sentry::check())return Redirect::route('users');
else {
$rules = User::$rules_login;
// show the login page (app/views/frontend/login.blade.php)
return View::make('frontend.login', compact('rules'));
}
So at first time mo url look like:
site.domain.com/entrar
'entrar', (login in spanish), y set by MyHelpers::textLang('login','routes'), access to my class MyHelpers and to lang files to translate 'login' in to 'entrar', but dont load the template.
Begins to :
- Read documentation, making some changes: deleting Multiviews from .htaccess (deprecated), adding RewriteBase to .htaccess too.
- Copy /public content to base dir and change paths in bootstrap/paths and in the index.php files.
- Reinstall in two remote servers to verify is not my provider failing (same error). Talking to my provider, supouse there are no errors on the server.
- I create a new htaccess in the base dir redirecting routes to /public.
- Try with php 5.4, 5.5 and 5.6
Actually my .htaccess is:
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
And I have no more ideas and cant find other solutions as related here.
Any idea? Please, I'm getting crazy, on wensday I have to beguin a new proyect and still working with this one.
Thanks
I have to add
to the .htaccess