hey guys have any of you guys ever use laravel for production and had to migrate all the files from the PUBLIC folder to the root folder so that you website would open when you go to www.yourwebsite.com and not www.yourwebsite.com and not www.yourwebsite.com/public . What are the steps that you had to take ?
Thank you.
Gautam.
Migrating files from the public folder in laravel
Moderator: General Moderators
Re: Migrating files from the public folder in laravel
Document root should be pointing to /public/ on both dev and prod. Which files are you talking about moving?
Re: Migrating files from the public folder in laravel
so the public folder can remian in production also ?? how do i point the document root to the public folder ??
I mean i just want my site to be visible when i go to www.yourwebsite.com vs right now I.E. www.yourwebsite.com/public
Thank you.
Gautam.
I mean i just want my site to be visible when i go to www.yourwebsite.com vs right now I.E. www.yourwebsite.com/public
Thank you.
Gautam.
Re: Migrating files from the public folder in laravel
DocumentRoot is generally specified in the VirtualHost definition.gautamz07 wrote:so the public folder can remian in production also ?? how do i point the document root to the public folder ??
I mean i just want my site to be visible when i go to http://www.yourwebsite.com vs right now I.E. http://www.yourwebsite.com/public
Thank you.
Gautam.
Re: Migrating files from the public folder in laravel
Do i have to edit something in my laravel application ?? i am not sure , i am understanding you.
Re: Migrating files from the public folder in laravel
Should be done at the Apache level, not in Laravel itself. Worst case, you can try with an .htaccess file in the root that sends all requests through to /public/. Try to fix the vhost definition first, though.
https://httpd.apache.org/docs/2.4/vhosts/
https://httpd.apache.org/docs/2.4/vhosts/