Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aligajani's avatar

Homestead 2.0 Issues on Yosemite

I have posted this on SO but no replies yet, therefore trying my luck here.

I have this strange problem. Let me describe it:

  1. The mapping on the .yaml doesn't work. forum.app will just open up a Google search.
  2. The debug is set to true for local, yet, errors aren't presented in browser. They're logged though.

I am using Homestead 2.0, Laravel 4 (everything is latest) on a Yosemite (updated today). The code is here:

YAML file

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

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: /Users/aligajani/Dropbox/Work/Code
      to: /home/vagrant/Code

sites:
    - map: forum.app
      to: /home/vagrant/Code/CommunityFT/forum/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local


HOSTS file

#Added by XAMPP Control
127.0.0.1 Alis-MacBook-Pro.local
192.168.10.10  forum.app
0 likes
20 replies
ELD's avatar

For the first issue, it's a strange problem, but are you typing forum.app or forum.app/? The former will trigger a Google search. The latter will trigger accessing your local development site.

For the second issue, what's your bootstrap/start.php look like? It should be hardcoded to look for 'homestead' as the hostname and then set the environment to development. If that happens, then you should get the typical error page.

aligajani's avatar

I am typing forum.app not the slash, and also, my start.php has 'local' => array('homestead'), hardcoded. Also, might be something wrong with my Yosemite's DNS because even a PHP Built-in web server won't work unless I explicitly do php artisan serve --host 127.0.0.1. The localhost always seems to say Can't get address etc. This problem is madness.

ELD's avatar

@aligajani - You need to make sure you're typing it into your browser with the / like so: forum.app/.

aligajani's avatar

Yes, I tried that too. To no avail. What do you think is the problem? Tried flushing DNS too. Nothing works.

bashy's avatar

Try ping forum.app to see where it's resolving to.

aligajani's avatar

@bashy Here it is, the details of pinging. forum.app ping doesn't return anything, however pinging IP address works fine.

aligajani@Alis-MacBook-Pro:~$ ping forum.app PING forum.app (92.242.132.30): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 ^C --- forum.app ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss aligajani@Alis-MacBook-Pro:~$ ping 192.168.10.10 PING 192.168.10.10 (192.168.10.10): 56 data bytes 64 bytes from 192.168.10.10: icmp_seq=0 ttl=64 time=0.406 ms 64 bytes from 192.168.10.10: icmp_seq=1 ttl=64 time=0.561 ms

bashy's avatar

Why is it resolving to 92.242.132.30?

1 like
aligajani's avatar

You are correct it is resolving to that IP address, why? PING forum.app (92.242.132.30): 56 data bytes.

bashy's avatar

Looking at the IP, it appears to be one owned by barefruit.co.uk who in turn do HTTP errors/advertising for ISPs.

Have you got BT broadband or something? Visiting the IP redirects to it http://92.242.132.30

Check you have the DNS set in your hosts file. Welcome to post it if you wish, there could be something wrong with how it's set.

aligajani's avatar

Yes, I am on a BT Broadband (Public network, BT-Fon to be precise).

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost

fe80::1%lo0 localhost

Added by XAMPP Control

127.0.0.1 Alis-MacBook-Pro.local

192.168.10.10 forum.app

aligajani's avatar

Also , the usual php artisan serve on a XAMPP setup gives me:

Failed to listen on localhost:8000 (reason: Can't assign requested address)

But works fine if I just do php artisan serve --host 127.0.0.1. Weird. I would love to find out what's happening guys.

bashy's avatar

Try disconnecting from that hotspot and then do it, must be overwriting it somehow (which is weird).

Sometimes you can't assign localhost to an address, is anything running on localhost:8000?

aligajani's avatar

Nothing is running on localhost:8000. This is evident because if I run the app on 127.0.0.1:8000, it works.

I tried disconnecting from the Internet all together, and tried pinging forum.app (wont even ping).

The rest of the issues still persist. I am pretty sure Yosemite's /etc/hosts and DNS are messing up.

bashy's avatar

If it won't ping, it's not set in your hosts file or your OS is not reading it properly.

localhost doesn't always resolve to 127.0.0.1, it can be used by something else on your system. You will need to do a netstat for port 8000.

Can't really help any more on the hosts issue. Too many things to test.

aligajani's avatar

Okay, so is there anything wrong with me making this work on 127.0.0.1:8000 ? By the way, it somehow is accessible on 0.0.0.0:8000 too. Just asking. Meanwhile, I agree with the hosts bit, too many things to test. I'll just blame Yosemite :)

bahit's avatar

Hmm.. I too just rebuild my Macbook Pro with Yosemite and using the latest build for homestead. Your homestead.yml looks fine. The my host file looks like this

127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
192.168.10.10   aimc.app
192.168.10.10   aimc2.app

The only additions are aimc.app and aimc2.app, try removing your:

fe80::1%lo0 localhost

127.0.0.1 Alis-MacBook-Pro.local

Maybe that is the problem. With homestead up, I can access my website via aimc.app or aimc2.app just fine via the web browser.

Roni's avatar

Another thing to consider, especially if you just did a fresh install of your mac, and you don't yet have to move anything around is do it again. I've had a bad install. And re-installing just made everything work. It happens. I've also had one bad install of homestead 2.0.

Lastly, I've used a fair amount of mamp and it does make some configuration changes, it's actually what drove me to homestead in the first place. If you do a fresh install, before you do anything else get homestead and vagrant, try and install it and the drop box for your files.

Once you have homestead running and your etc/hosts is set try it again, see what happens.

Happy holidays and good luck

futurefry's avatar

check your console logs, maybe they tell you something.

Please or to participate in this conversation.