Laravel Homestead: 'php artisan serve' not working

2.4k views Asked by At

When I run the command php artisan serve in the directory /home/vagrant/Code/Laravel/ it appears to work. (/Laravel is my project directory)
Screenshot of Terminal

But when I open up localhost:8000 in the browser, I get this: Error Page Image

Thanks for your help in advance.

2

There are 2 answers

0
Simon Richard On BEST ANSWER

I reinstalled vagrant, virtualbox, and homestead, and then ran vagrant up in ~/Homestead instead of ~/Code. This worked.

Thanks for your help anyway.

0
St3f On

If you are running a homestead/vagrant box, hey would you use php artisan serve? Homestead ist starting a virtual box with apache, php, mysql... there ist no need for artisan serve... just add the IP of the box (specified in the Homestead.yaml file) and the domain name to your /etc/hosts file.