Reputation: 360
I got started with Laravel 5.3 and I got my development environment working on local, but now I need to upload the app to production server. I cant found nothing about configuring two environments on same app.
I use Apache web server on both (local and production).
Any guide/doc is well received!
Upvotes: 12
Views: 35936
Reputation: 2377
Better to follow this blog:
https://devmarketer.io/learn/deploy-laravel-5-app-lemp-stack-ubuntu-nginx/
With that blog, if you're not using Nginx but Apache, that's fine because we are more concerned with the Laravel configuration and permissionings on files and folders than the web server.
Upvotes: -1
Reputation: 354
The docs (as pointed by Marcin) suggest to use the .env file to configure your environment. Different environments = different .env files. Thus, on local machine you'd have an .env file with your local enviroment configuration, and on production you'd have a different .env file, and a diffrent one for staging, and so on... APP_ENV=production
Which can be brought forth with App::environment()
Remember to exclude the .env from versioning, cheers.
Upvotes: 15