S.M_Emamian
S.M_Emamian

Reputation: 17383

how to install laravel inside an addon domain

I have an addon domain like this :

/public_html/mysite

Site is available from the following address:

www.mysite.com

now I want to install laravel on this addon site.

I've copied all folders insdie mysite directory :

but when I enter www.mysite.com on my browser it shows content of my laravel project :

enter image description here

solved:

How to install laravel inside an addon domain

Upvotes: 1

Views: 1806

Answers (2)

Muhammad Umar Gulzar
Muhammad Umar Gulzar

Reputation: 184

There are different ways you can install laravel inside an addon domain. Here is one of the easiest ways to do it.

  1. Go to your CPanel and open Softaculous Apps Installer.
  2. Look for Laravel Installer and open it. Carefully select the addon domain where you want to install Laravel.
  3. Click Install. If there was no previous install then it would take 3-4 seconds.
  4. Now go to the File Manager and open that specific domain folder. You will see All the laravel files there.

Now if you have an existing project that you want to upload on this domain simply make a zip file of your project and upload & extract inside this domain folder.

ONE LAST THING

When you install Laravel using Softaculous Apps Installer you get a redirect from domain to /public. To resolve this open index.php file (Not the one inside the public folder, one that is outside). Remove all the code from it and just paste the code given below.

<?php
header('Location: public/');
?>

And that is it. This should work for you.

Upvotes: 3

Nour
Nour

Reputation: 1497

Is it a shared hosting you're using if yes then :

Put the content of public (L5) directly on public_html (be aware of don't overwrite the .htaccess file accidentally) Now in then modify your index.php and your bootstrap.php and it will work just fine

Upvotes: 0

Related Questions