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 trial

PHP Laravel 4 Basics Project Setup Introducing Routing

Mike Zhu
Mike Zhu
1,840 Points

What should I do if I want to get access to the laravel.dev:8000 after I restart my computer?

Sorry I am new to this field. I just installed laravel successfully and I successfully get access to the laravel.dev:8000 at the first day. But after the next day, I failed to load this page, the browser said the connection timed out. Should I type my own local host IP address? Because I am not sure whether it will change from day to day. Or should I open something like the Apache server, just like what I did using MAMP before? I am a newbie and hope someone can help me! Thanks!

1 Answer

Hey man,

When you restart your computer, you're also going to stop your local servers - exactly like you have to with MAMP. What configuration are you using? Is it Homestead or the 'php artisan serve' command?

Ah I've just read your other question you posted before this. I might go ahead and delete it because I think they're duplicates?

But yes, you will have to run vagrant up every time you want to start up the server.

If you ever want to stop the server, use

vagrant halt

This command will keep your database for the next boot up! Some methods will clear everything out, so read the documentation before you run commands ;)

Mike Zhu
Mike Zhu
1,840 Points

Thank you so much for your answer! I am using Homestead now. I tried to open MAMP server but it still doesn't work. And after I type "vagrant up" in the terminal, it says "Couldn't open file /Users/Mike/base".

Hmm to me it sounds like you're not running vagrant up in the right place. Before you run 'vagrant up', you'll need to navigate to wherever your project is sitting.

Your set up may be different from this, so play around! If you get stuck, let us know. Remember that some operating systems are case sensitive.

cd ~

cd Homestead/Projects/my-project-name

vagrant up

I think you can get away with just navigating to the Homestead directory instead of into your site, but it's likely you'll be running artisan commands etc, so it's more useful ;)

Mike Zhu
Mike Zhu
1,840 Points

Thank you so much! I know where I am wrong. I didn't go to my project folder to vagrant up! But after I went to my project folder and vagrant up, all of them works expect it says "The specified host network collides with a non-hostonly network! This will cause your specified IP to be inaccessible. Please change the IP or name of your host only network so that it no longer matches that of a bridged or non-hostonly network." I am not sure what it means. But thanks so much for your help!

No worries! Can you paste in a copy of your Homestead.yaml file?

Mike Zhu
Mike Zhu
1,840 Points

Yeah! I know where it is wrong. Because I change the IP of homestead.yaml to my own computer's IP address. After I change it back to 192.168.10.10, and all seems work fine to me! Thank you for your kind help!

awesome!