Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel homestead IP address not working

Tags:

I’m using Laravel Homestead 2.0 for my VM and am trying to serve my sites on the default IP address in the YAML file 192.168.10.10

My /etc/hosts file looks like this:

# Homestead
192.168.10.10   beta.dev
192.168.10.10   deploy.dev

My Homestead.yaml file looks like this:

---
ip: "192.168.10.10"
memory: 2048
cpus: 1

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Projects
      to: /home/vagrant/Projects

sites:
    - map: beta.dev
      to: /home/vagrant/Projects/emorybeta/public
    - map: deploy.dev
      to: /home/vagrant/Projects/deploy/public

...

The sites come up when I link my domains to 127.0.0.1 but I have to append port 8000 onto the end of the URL (which isn’t a big deal, I just want to get the specified IP address to work).

Does anyone know why I cannot connect to server when my domains are pointed to 192.168.10.10?


UPDATE:

When I ping deploy.dev the right IP address shows up, but still my browser can’t connect to the server. I’m thinking it might have something to do with DNS issues in Yosemite.

like image 510
evcohen Avatar asked Jan 20 '15 02:01

evcohen


2 Answers

I had the same problems a few weeks ago.

First: make sure your folder paths are correct, if so, double check it

Next: run homestead destroy and homestead up to reinitialize the VM

if that all didnt work: Check if you have any devices at home that might also be on 192.168.10.10.

If that all didnt work, your problem is probably alot harder to fix and i'd suggest making a github issue for it.

like image 156
Nick Avatar answered Oct 18 '22 14:10

Nick


Hey I had this exact same problem. I eventually got it working by installing the deprecated net-tools package: sudo apt-get update and sudo apt-get install gnome-nettool

After this, homestead destroy and homestead up

This allowed me to access my virtual machine sites from my local machine's browser using the 'domains' I specified in the hosts file - in your case beta.dev and deploy.dev - without referring to localhost or port 8000. Good luck, hope this helps.

like image 26
Logan Graba Avatar answered Oct 18 '22 14:10

Logan Graba