Home » Php » url – PHP artisan use domain without port number

url – PHP artisan use domain without port number

Posted by: admin February 25, 2020 Leave a comment

Questions:

When I serve my laravel project with php artisan serve --host=yum-yums.local, I can access the site via http://yum-yums.local:8000

My host file has 127.0.0.1 yum-yums.local

How can I access the site with just yum-yums.local please, with no port number appended?

How to&Answers:

80 port is the default port number of http so you have to use this command to omit the port number:

sudo php artisan serve --host=localhost --port=80