Minggu, 01 Januari 2023

Mengatasi XAMPP: Another web server is already running

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.

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!

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

We notice a number 1090 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 1090

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.

Tidak ada komentar:

Posting Komentar