Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run multiple Laravel projects at same time?

To run one laravel project we only need to type "php artisan serve". and it will be available on port 8000.

But sometimes we need to run multiple projects at the same time. How can we do this?

like image 202
Amin Adel Avatar asked May 06 '17 07:05

Amin Adel


2 Answers

tl;dr one cannot have more than one listener per TCP port at the same time. If you need more web server instances: try another port:

php artisan serve --port=8001

then go to http://localhost:8001


References:

  • Can two applications listen to the same port?
  • https://laravel.com/docs/8.x
like image 56
emix Avatar answered Sep 28 '22 08:09

emix


You can also run web server on multiple port in PHP application by the following command.

php -S localhost:8000 
php -S localhost:8080
like image 39
Nazmul Hasan Avatar answered Sep 28 '22 08:09

Nazmul Hasan