4

When I run php artisan serve on Ubuntu, the Laravel development server tries to start on http://localhost:8000/ but fails with this error:

[Mon Apr 25 10:28:08 2016] Failed to listen on localhost:8000 (reason: Cannot assign requested address)

My hosts file (/etc/hosts/):

1 27.0.0.1   localhost 

How can this be fixed?

Community
  • 1
  • 1
tree em
  • 20,379
  • 30
  • 92
  • 130

1 Answers1

9

That's usually because the port is in already in use, or not available on the current host.

You can use this command to run php artisan serve --port=8080

ganesh kalje
  • 3,014
  • 2
  • 16
  • 12