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

You need to point your document root to the public folder.

If this is an addon domain you can change it yourself by going to Addon domains and clicking edit near the document root for the domain pointing to the laravel app.

If it is the main domain for the account you will need root access to the server to change the document root.

If you don't have root access you'll need to contact your hosting company and have them change it for you.

If they wont change it you are out of luck and should change hosting companies.

Well actually that isn't fully true. What you can do is change your app to match the directory structure you have to work with. Put everything in the public directory in the public_html directory and all the other directories one directory higher than that.

Then edit bootstrap/paths.php and change the public directory to

'public' => __DIR__.'/../public_html',
Last updated 2 years ago.
0

This is the main domain, so I likely need to change the document root. I do have root access, but am unsure how to make the change. I'll do some googling, but if you happen to know please feel free to offer direction.

I appreciate the help.

Last updated 2 years ago.
0

OK, on cPanel, for the primary domain, I had to go into /var/cpanel/userdata/USER/ and then nano the DOMAIN.COM file. Once there, I had to change the documentroot line to where I wanted the root to be (/home/USER/public_html/laravel/public). I also updated hascgi from 0 to 1, and under scriptalias I added a path for cgi-bin (/home/USER/public_html/laravel/public/cgi-bin/).

It worked. I knew I was forgetting something, document root was it. Thank you very much for taking the time to respond.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

kjtocool kjtocool Joined 6 Jul 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.