Reputation: 46
I'am using Symfony and Laravel on same machine. I'am on developement, and I have no webserver, I use the local server of each of them.
For Symfony, that works :
$ cd /var/www/symfony
$ php bin/console server:start
[OK] Server listening on http://127.0.0.1:8000
For Laravel, that does not work :
$ cd /var/www/laravel
$ php artisan serve
Laravel development server started: <http://127.0.0.1:8000>
[Thu Oct 12 21:46:21 2017] Failed to listen on 127.0.0.1:8000
When I stop the Symfony, then the Laravel works. There is a conflict between the 2 tools.
I am obliged to have the 2 working, because there is a REST-API on my Lavavel site and my symfony site is a client of this API.
How can I run the 2 sites with local development server, without installing a webserver ?
Upvotes: 2
Views: 877
Reputation: 2532
Use below command for run laravel project.
php artisan serve --port=8888
Using this command you can run laravel project in a different port.
Upvotes: 0
Reputation: 1359
Your problem is that you can not share the same port on the same host.
I don't know Laravel, but I know Symfony. With Symfony you can change the port of the local server with this command :
php bin/console server:stop
php bin/console server:start 127.0.0.1:8080
After this command, you can try to restart your Laravel server, and you will have :
Upvotes: 1