dimanche 2 juillet 2017

Getting Internal server error when uploaded laravel project in shared hosting. How to resolved that? [duplicate]

I had uploaded laravel 5.3 project on shared hosting. But I am getting internal server error on every route. I had given 777 permission to all files and folder, but still getting that error. I had uploaded the laravel project in sub folder inside public_html folder.

My .htaccess file(public_html/xyz/public/.htaccess) : Options -MultiViews

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}]

My index.php file(public_html/xyz/public/index.php) :

    <?php

    /**
    * Laravel - A PHP Framework For Web Artisans
    *
    * @package  Laravel
    * @author   Taylor Otwell <taylor@laravel.com>
    */

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


    $app = require_once __DIR__.'/../bootstrap/app.php';

    // set the public path to this directory
    $app->bind('path.public', function() {
    return __DIR__;
    });

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

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

$response->send();

$kernel->terminate($request, $response);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire