Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 2 years ago.
0

It is prety simple to host in sub directory.

just create new folder named "laravel" in public_html and copy all the files there.

You can navigate your project at example.com/laravel/public

If you wish to use example.com/laravel/ than you need to modify paths in bootstrap/paths.php

0

you have to create two folders i.e laravelApp and laravel (your sub folder) in your root directory, then follow these steps:

  1. Copy all file and folder (except the public folder) from your app into that "laravelApp/" folder.

  2. Copy the content of public/ folder into your laravel/ (i.e sub folder)

  3. now edit index.php (location : Inside laravel/ folder) :

require DIR.'/../bootstrap/autoload.php'; to require DIR.'/../laravelApp/bootstrap/autoload.php'; and

$app = require_once DIR.'/../bootstrap/start.php'; to $app = require_once DIR.'/../laravelApp/bootstrap/start.php';

  1. now go to laravelApp/bootstrap/ and edit the paths.php file:

'public' => DIR.'/../public', to 'public' => DIR.'/../../laravel', 

thats all. now you can test your application @ http://yourdomain.com/subfolder

Last updated 9 years ago.
0

Do you have root access to your server?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

tisuchi tisuchi Joined 28 Feb 2014

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.

© 2024 Laravel.io - All rights reserved.