Don't change app, public folders or anything else, change hosting provider.
Jul 9, 2021
6
Level 1
Error 500 on shared hosting after changin app folder
Hello. I got a folder structure
/home/usrname/domains/domain.com/public_html
And i want to move laravel files from public html to domain.com/laravel so i change index.php in public_html to:
require (dirname(__DIR__) . "/laravel/vendor/autoload.php");
which gives me the /home/usrname/domains/domain.com/laravel/vendor/autoload.php path.
$app = require_once (dirname(__DIR__) . "/laravel/bootstrap/app.php");
After that still got a error 500. Permissions: 755.
server.php in laravel folder:
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <[email protected]>
*/
$uri = urldecode(
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);
if ($uri !== '/' && file_exists(__DIR__.'/../public_html'.$uri)) {
return false;
}
require_once __DIR__.'/../public_html/index.php';
Please or to participate in this conversation.