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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With