I am having a hard time figuring this one out. I was just setting up a new machine, and can't get php artisan serve
to work. Gives me the following error. Also, note, I just did a fresh XAMPP install.
Laravel development server started on http://localhost:8000 [Wed Dec 24 14:06:35 2014] Failed to listen on localhost:8000 (reason: Can't assign requested address)
I have stopped the apache server for the Mac, and even XAMPP. Going to 127.0.0.1 or localhost doesn't give me "It works!" anymore. Even then, when I do, php artisan serve
for my fresh Laravel application, it just shows up that error. How do I fix this. I uninstalled older XAMPP and started from scratch.
Updates
If I do php artisan serve --host 0.0.0.0
it works. However, I'd like to know what's happening and a potential solution to this. Moreover, I have this in my /etc/hosts
at the end 127.0.0.1 Alis-MacBook-Pro.local
. Putting Alis-MacBook-Pro.local
in address bar does show It works!