Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

klokand's avatar

How to stop a remote php artisan serve

Hi, everyone, I installed laravel in AWS EC2, and I start php artisan serve, however, when I try to stop it by ctrl+C, unfortunately, it stop my ssh to the AWS server. After that, I tried to connect to the server again, and tried php artisan serve second time, there was a exception for fail to watch listen on localhost:8000. So guess it's still running.

What shall I do, how can I stop the artisan serve?

Thanks

0 likes
2 replies
mstnorris's avatar
Level 55

check what processes are running and kill it that way.

1 like
n@pster's avatar

You can check the process running by excuting this in ubuntu

Port Listing :

sudo netstat -plnt

Port Disabling/Killing :

sudo kill sudo lsof -t -i:3001

3 likes

Please or to participate in this conversation.