当我们使用命令:sudo /opt/lampp/lampp start 启动XAMPP时出现如下错误:
Starting XAMPP for Linux 5.6.28-0...
XAMPP: Starting Apache...fail.
XAMPP: Another web server with SSL is already running.
XAMPP: Starting MySQL...ok.
一般都是端口被占用了!
分别打开配置文件/opt/lampp/etc/httpd.conf和/opt/lampp/etc/extra/httpd-ssl.conf我们可以看到默认的端口分别是80(字样“Listen 80”)和443(“Listen 443”)。
使用命令neststat -ant查看哪个端口被占用了。
如果80端口被占用了:
把配置文件/opt/lampp/etc/httpd.conf的端口改为其它(比如:Listen 8080),对应的把文件/opt/lampp/lampp端口改为一致("testport 80"改为"testport 8080")
如果443端口被占用了:
把配置文件/opt/lampp/etc/extra/httpd-ssl.conf的端口改为其它(比如:Listen 8443),对应的把文件/opt/lampp/lampp端口改为一致("testport 80"改为"testport 8443")