PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue May 23, 2017 5:34 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Feb 07, 2017 12:05 pm 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 317
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.


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 12:39 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6243
Location: Montreal, Canada
Document root should be pointing to /public/ on both dev and prod. Which files are you talking about moving?

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 12:44 pm 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 317
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.


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 12:48 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6243
Location: Montreal, Canada
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.

DocumentRoot is generally specified in the VirtualHost definition.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 12:52 pm 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 317
Do i have to edit something in my laravel application ?? i am not sure , i am understanding you.


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 12:55 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6243
Location: Montreal, Canada
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/

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group