I create small registration system for my site with laravel framework.
Now I want to upload that on my "shared host".
my host control panel is Direct Admin
.
1.first is create sub domain like this: reg.mydomain.me
.
after that I created a reg
folder on my root directory and copy all of laravel folders and files in that.
/home/mydomain.me/public_html/
I moved all the main file of Laravel (app, boostrap, vendor, composer.json, composer.lock, phpunit.xml etc) into
reg
folder **except Public folder.Opened
/home/username/main-laravel/bootstrap/paths.php
and edit to look like this:replace 'app' => DIR.'/../app', to 'app' => DIR.'/../../main-laravel/app',
replace 'public' => DIR.'/../public', to 'public' => DIR.'/../../public_html/laravel',
replace 'base' => DIR.'/..', to 'base' => DIR.'/../../main-laravel',
replace 'storage' => DIR.'/../app/storage', to 'storage' => DIR.'/../../main-laravel/app/storage',
and create a new folder inside public_html
' /home/username/public_html/reg/laravel '
I moved all the content in public folder of Laravel into 'public_html/reg/laravel' folder (step 4)
Open /home/username/public_html/reg/laravel/index.php and edit to look like this:-
replace require DIR.'/../bootstrap/autoload.php'; to require DIR.'/../../main-laravel/bootstrap/autoload.php';
replace $app = require_once DIR.'/../bootstrap/start.php'; to $app = require_once DIR.'/../../main-laravel/bootstrap/start.php';
but when I run the reg.mydomain.me I get blank page!!!
what can I do for run laraval in subdomain ?
tnx
/home/username/reg
and then let your subdomain document root point at/home/username/reg/public
? – lukasgeiter