Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJenny Swift
21,999 Pointshow to use Laravel on production site-I get a 'page not found' error
Hi, so I'm using Laravel for my app and it is working locally. I want to now use it on my production site.
I suppose I just FTP the app like I would if I wasn't using Laravel? But when I go to my URL I get a 'page not found' error.
Can anyone help, please? Am I supposed to change some sort of configuration so it works for my production site?
Also, I've been going through both Laravel Basics here at Treehouse and also Laracasts, and there doesn't seem to be much about how to set the environment variables for my production environment. Am I supposed to create a new .env file just on my server for my production environment variables?
2 Answers
Jenny Swift
21,999 PointsI ended up switching to DigitalOcean and Laravel Forge because that's what is recommended in the Laracasts, and there are tutorials at Laracasts on how to deploy an app using these.
Petros Sordinas
16,181 PointsHi Jenny,
You might want to have a look at this http://driesvints.com/blog/laravel-4-on-a-shared-host
Jenny Swift
21,999 PointsThanks Petros! I switched hosts to make it easier, but I think the post you linked to helped convince me to do so.
Jenny Swift
21,999 PointsJenny Swift
21,999 PointsThanks to this I have now found my app by adding /public to my url.
Not sure if this is the best way though. Should I be using git instead of FTP?