Support the ongoing development of Laravel.io →
Laravel Installation

i'vd created project-name folder in public_html and placed public's content into it and create another folder inside project-name which i named it logic and put all laravel's project file into it except public folder

And

i've modifyed index.php like this

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

to

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

also

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

to

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

But, when i wanna access to www.domain.com/project-name i got 403 error

my folder structure look like this

public_html
  >other_folders
  >project-name
    |logic
      |app
      |bootstrap
      |database
      |and other project's file&folder
    |index.php
    |.htaccess
    |etc

**note that : **i've checked this topic's solution https://laravel.io/forum/03-06-2015-how-to-setup-laravel-5-in-shared-hosting but i still have this issue

Last updated 3 years ago.
0

Move folder of logic outside of your project and then give relative path from that.

Don't forget to clear your cache. Set your DNS in shared hosting

0

if you have SSH access to that server, check and update the file and directory permissions. Make sure you have the latest PHP support.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Hamed Hamed hesmaili95 Joined 1 Jul 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.