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 trialyoga Hadi Nugroho
Courses Plus Student 145 Points127.0.0.1:8000 returns 502 Bad Gateway
my homestead.yaml file sites to the exact same path.. But after I type 127.0.0.1 in web browser it returns 502 Bad Gateway.. Where did I do wrong? Please Help
5 Answers
thomashysselinckx
6,792 PointsPlease make sure you are editing the right Homestead.yaml file. At first I was looking at ~/Homestead/src/stubs/Homestead.yaml, but as the Laravel docs say:
The Homestead.yaml file will be placed in the ~/.homestead hidden directory
It appears that in the current version of Laravel (5.2), you should look for the .yaml file in this - hidden - folder. That made it work for me.
Don't forget to run
vagrant reload --provision
from your Homestead folder, after updating the .yaml file.
Michalis Efstathiou
Courses Plus Student 4,638 Pointsdid you add the ip to your host file?
in windows its in C:\Windows\System32\drivers\etc on mac and linux its in /etc/hosts
so in homestead.yaml you will have something like this:
ip: "192.168.10.10"
sites:
- map: mywebsite.app
to: /home/vagrant/Code/my_app/public
and in your hosts file you will add this line (make sure you dont comment it out by putting a # in front)
192.168.10.10 mywebsite.app
then you will be able to access your app by typing mywebsite.app in your browser
documentation is very descriptive, take a look if you still cant make it work
harishupadhyayula
32,221 PointsI had the same problem and I tried the following and it worked.
vi ~/Homestead/Vagrantfile
# Add this line to your Vagrantfile
config.ssh.insert_key = false
vagrant reload
This might remove your larvel-basics folder from Sites/, if it does, re-install larvel again into Sites/larvel-basics/
Now if you go to larvel.dev:8000
or 127.0.0.1:8000 ```, you should see Larvel 5 or Welcome to Larvel depending on the version you are trying to install
Hope this helps
yoga Hadi Nugroho
Courses Plus Student 145 PointsI dont know what happen.. I uninstall vagrant, vitualbox, composer.. start all over again.. and everything work well.. Except that in hosts I entered ip address 127.0.0.1 not the 192.168.10.10.. Thank you for your support..
Sam Chen
4,991 PointsHaving the Same issue, Please help
Gary Alan Jackson
14,014 PointsGary Alan Jackson
14,014 PointsI'm not familiar with Laravel (yet), but is port 8000 open on your server. Try going to http://127.0.0.1:80 or http://localhost:80. If you did open port 8000 (again, haven't watched tutorial, so I'm not sure of the process) make sure everything has been restarted (server and host, if necessary).
Hope that helps.