由于开发的需要,今天在自己电脑上安装了XAMPP,但是在启动数据库和服务器时,服务器启动失败,好像是端口占用的问题,看了一篇和我同样的问题的文章,试了好几种方法,才解决我的难题,方法如下:
This is because in Mac OS X there is already Apache pre-installed. So what you can do is to change the listening port of one of the Apaches, either the Apache that you installed with XAMPP or the pre-installed one.
To change the listening port for XAMPP's Apache, go to /Applications/XAMPP/xamppfiles/etc and edit httpd.conf. Change the line "Listen 80" (80 is the listening port) to other port, eg. "Listen 1234".
Or,
To change the one for pre-installed Apache, go to /etc/apache2. You can do the same thing with file httpd.conf there.
After changing you might need to restart your Mac, just to make sure.
另外,附加上这篇文章的网址:http://stackoverflow.com/questions/4582504/xampp-apache-webserver-localhost-not-working-on-mac-os
网友评论