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 trialChelsey Beck
1,905 PointsWhat is the correct way to work with two (or more) projects in Laravel?
I have created a new project via Composer and edited the .yaml file to add another site. I am trying to map to another URL and I have edited the hosts file, but both urls point to the same site. Any ideas?
Below is Homestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: /Users/username/.ssh/id_rsa.pub
keys:
- /Users/username/.ssh/id_rsa
folders:
- map: /Users/username/Homestead/Projects
to: /home/vagrant/Sites
sites:
- map: laravel.dev
to: /home/vagrant/Sites/laravel-basics/public
- map: laravel2.dev
to: /home/vagrant/Sites/laravel-basics2/public
Chelsey Beck
1,905 PointsChris, yes. I have run vagrant reload. Both URLs still point to the same Laravel installation.
1 Answer
Chris Shaw
26,676 PointsHi Chelsey,
Sorry for the delaying in getting back to you, I set up a clean Homestead on my Windows PC and mapped two sites without any issues. The only other thing I can think of to try is, create a new Homestead instance and see if the same issue persists.
I did find some information which you can also try that has solved the same issue for others in the past.
http://stackoverflow.com/questions/27207150/homestead-2-0-multiple-sites-all-link-to-the-same-url
Chris Shaw
26,676 PointsChris Shaw
26,676 PointsHave you run
vagrant reload
? If not run that which will reload nginx and map the new site paths and their given host names.