MAMP - Mac OS X

寵の児 提交于 2019-12-04 10:37:10

You can check what processes that are listening on what ports with lsof:

sudo lsof | grep LISTEN

Look for processes listening on *:http etc.

Update:

You see that one process is already using *:http which is a process named httpd with pid 21. httpd is most likely a Apache process. So I would guess that your system already have an Apache installation somewhere (that might auto start) or that the MAMP Apache is already running for some reason.

Try to run ps 21 to get more information about the process. On my system where I have MAMP installed an running I see this: (65696 is the pid of httpd on my system).

mattias@waderbook:~$ ps 65696
  PID   TT  STAT      TIME COMMAND
65696   ??  Ss     0:00.57 /Applications/MAMP/Library/bin/httpd -k start

If you see /usr/sbin/httpd it is likely the Apache bundled with OS X that is running. Try to disable it by going to "Sharing" in Preferences and disable "Web sharing".

In my case, there was nothing to be found when using grep on lsof.

I've been looking for a few hours to find what was creating the Listen directives to overlap but without result.

So I've used a quickfix, and that was to change my Listen port in httpd.conf to 8000

Listen 8000

change that, and restart your apache2. Should do the trick...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!