[Solved] XAMPP: Another web server is already running

Kimiyuki Yukawa
3 min readDec 22, 2018

--

So I started terminal and type :
cd /opt/lampp/ && sudo -s
./lampp start
and then here is what happened

As you can see, it turns out that Apache is failed to start because Another web server is already running, said Sam (a.k.a XAMPP). How could this happen? I didn’t start any web server, though. I’ve just turned on my laptop, booted to Elementary OS 5.0 Juno (yeah, it’s Linux), and logged in. I haven’t done anything yet except opening a terminal and run XAMPP.

TL;DR

Solved by running this on terminal
sudo netstat -nap | grep :80
You’ll see apache2 and there is 3–4 digit numbers before it, mine is 980
sudo kill [number]
where [number] is the number for apache2 , in this case I run sudo kill 980
*The number might be different than yours.
Start XAMPP again.
cd /opt/lampp/ && sudo -s
./lampp start

Well, first we should take a look if there is a web server running when we boot the first time. Run this command on terminal:
sudo netstat -nap | grep :80
and see what we’ve got there.

There we found an Apache web server is running. This is our intruder who sabotage our web server and ruin our works. So what should we do?

You know what you have to do. Just KILL it!

Punishment is justice for the unjust — Saint Augustine

We’ll get the first blood here, you ready?? 😠

We notice a number 980 before /apache2, it’s the number we use if we want to kill the web server. Though, it might be different than yours.
Quite smart, huh? We shouldn’t let it live any longer.

Now, execute this
sudo kill [number]
*replace [number] with the number you see on terminal
In this case I run sudo kill 980

Let’s see if we got it, do this
sudo netstat -nap | grep :80

It’s gone! WE DID IT!!( /play tada )

Now could try to run XAMPP again.
./lampp start

Victory! Now let’s get back to work. The game has just started, Mate.

Your welcome.

--

--

Kimiyuki Yukawa

Love to write and code, yet need to learn more. Feedback always welcome