About the root directory for laravel framework

Hi admin,

For laravel framework, I know the server for hosting our website is apache. Because of this the server will just use xxxx/ htdocs/ for its root directory. Yet laravel uses xxxx/ htdocs/ public for its root directory. I was wondering how to change the server root directory to xxxx/ htdocs/ public? If there is no method, instead of accessing using domainname.com/public, is there any other way to do it? Please help.
Thank you so much for your help!


Unfortunately, you cannot change the document root of your website. It’s also not possible to upload Laravel to the root directory of your account because of an open_basedir restriction. However, I think (but I’m not sure) you can move the contents of the public directory to the main Laravel directory, change the require rule in the index.php file and run it that way.