简体   繁体   English

XAMPP:另一个 Web 服务器已经在运行

[英]XAMPP: Another web server is already running

I get the following error after installing gitlab..安装 gitlab 后出现以下错误。

root@Blase:~# sudo /opt/lampp/lampp start
Starting XAMPP for Linux 7.0.9-1...
XAMPP: Starting Apache...fail.
[XAMPP:  Another web server is already running.][1]
XAMPP: Starting MySQL...already running.

I cannot access my localhost/phpmyadmin or any projects folder as am redirected to Gitlab.我无法访问我的 localhost/phpmyadmin 或重定向到 Gitlab 的任何项目文件夹。

I tried to view which program is using port 80 by running: "netstat -tulpn | grep --color :80" and i got the output shown in attached image.我试图通过运行"netstat -tulpn | grep --color :80"来查看哪个程序正在使用端口 80,我得到了附件图像中显示的输出。 Any help guys?有帮助吗? 在此处输入图像描述

I had to stop all the services,我不得不停止所有的服务,

$sudo /etc/init.d/apache2 stop

$sudo /etc/init.d/mysql stop

$sudo /etc/init.d/proftpd stop

Then I restarted the server然后我重新启动了服务器

sudo /opt/lampp/lampp restart

**Running Server on Linux Ubuntu ** **在 Linux Ubuntu 上运行服务器 **

In my case Nginx server is already running that's why i am getting this kind of error.在我的情况下,Nginx 服务器已经在运行,这就是我收到这种错误的原因。

I stop the Nginx Web server first then start Apache server.我先停止 Nginx Web 服务器,然后启动 Apache 服务器。

Stop Nginx server停止 Nginx 服务器

sudo systemctl stop nginx

Start Apache Server启动 Apache 服务器

sudo /opt/lampp/lampp start

Must Read必读

Sometimes it can be port conflict between web servers.有时可能是 Web 服务器之间的端口冲突。 Changing the port number of both server or maybe one server we can run both servers at a time.更改两台服务器或一台服务器的端口号,我们可以同时运行两台服务器。

I face this problem then I stop LAMP services.我遇到了这个问题,然后我停止了 LAMP 服务。

sudo service apache2 stop
sudo service mysql stop

then check these services has stopped然后检查这些服务是否已停止

sudo service apache2 status
sudo service mysql status

then run xammp and try start MySQL server and apache server然后运行 ​​xammp 并尝试启动 MySQL 服务器和 apache 服务器

The most possible reason why your Xampp server is not running is that you might have installed Xampp and apache2 simultaneously or MySQL server. Xampp 服务器未运行的最可能原因是您可能同时安装了 Xampp 和 apache2 或 MySQL 服务器。 So in order to work with Xampp server, you have to stop the Apache2 and MySQL.所以为了使用 Xampp 服务器,你必须停止 Apache2 和 MySQL。

$sudo /etc/init.d/apache2 stop

$sudo /etc/init.d/mysql stop

And then restart Xampp server然后重启 Xampp 服务器

$sudo /opt/lampp/lampp restart

You only need to stop Apache2你只需要停止 Apache2

$sudo /etc/init.d/apache2 stop

then you may restart lampp那么你可以重启lampp

$sudo /opt/lampp/lampp start

Link to pic of an illustration链接到插图的图片

If when starting Apache server XAMPP responds "Another web server is already running", run this command: sudo netstat -nap | grep :80如果在启动 Apache 服务器时 XAMPP 响应“另一个 Web 服务器正在运行”,请运行以下命令: sudo netstat -nap | grep :80 sudo netstat -nap | grep :80

you will see something like tcp6 0 0 :::80 :::* LISTEN 1078/apache2你会看到类似tcp6 0 0 :::80 :::* LISTEN 1078/apache2

then run sudo kill 1078 - in my case 1078 (in your case probably another number)然后运行sudo kill 1078 - 在我的情况下是 1078 (在你的情况下可能是另一个数字)

I had a similar issue.我有一个类似的问题。 If I stop apache2 using:如果我使用以下命令停止 apache2:

$sudo /etc/init.d/apache2 stop

the issue persists, refer to this site: https://askubuntu.com/questions/170640/how-to-disable-apache2-server-from-auto-starting-on-boot .问题仍然存在,请参阅此站点: https ://askubuntu.com/questions/170640/how-to-disable-apache2-server-from-auto-starting-on-boot。

I experienced this issue using ubuntu 18.04, but all the solutions I found here did not solve my problem.我使用 ubuntu 18.04 遇到了这个问题,但是我在这里找到的所有解决方案都没有解决我的问题。 So I want to share what I did so that it might help others as well.所以我想分享我所做的,以便它也可以帮助其他人。

go in the /etc folder in the root file system, and delete the Apache2 folder.进入根文件系统的/etc文件夹,删除Apache2文件夹。 Xampp has it's apache in the opt/lampp directory, so the Apache in the etc folder conflicts since this one starts at startup. Xampp 在 opt/lampp 目录中有它的 apache,因此 etc 文件夹中的 Apache 在启动时会发生冲突。 To access these folders, use the command $sudo nautilus要访问这些文件夹,请使用命令$sudo nautilus

You can add convenient aliases to:您可以将方便的别名添加到:

alias xampp-start='sudo /etc/init.d/apache2 stop && sudo /opt/lampp/lampp start'
alias xampp-stop='sudo /opt/lampp/lampp stop'
alias xampp-restart='sudo /opt/lampp/lampp restart'
alias xampp-gui='sudo /etc/init.d/apache2 stop && sudo /opt/lampp/manager-linux-x64.run'

If still not resolved.如果还没有解决。 please check this link .请检查此链接

It helped me.它帮助了我。

This is the part that really solved my problem to stop the server that was running earlier.这是真正解决我的问题以停止之前运行的服务器的部分。

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你会看到 apache2 前面有 3-4 位数字,我的是980

sudo kill [number]

where [number] is the number for apache2 , in this case I run sudo kill 980其中[number]apache2的编号,在这种情况下我运行sudo kill 980

*The number might be different than yours. *该数字可能与您的不同。

Start XAMPP again.再次启动 XAMPP。

cd /opt/lampp/ && sudo -s

./lampp start

I hope this is helpful我希望这是有帮助的

sudo apachectl stop然后从 xampp 管理器启动 apache Web 服务器对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM