1

I'm building a docker project where I assign port 80 to nginx.

ports:
  - 80:80

This fails when I docker-compose up -d because it says that port 80 is already taken.

After restarting my mac indeed this mysterious thing is up and running but I have no idea what is it. Docker itself is off. Vagrant is off.

The following command sudo lsof -i -P | grep -i "80" doesn't help much.

How can I find out which app is taking port 80?

PS. When I map different port:

ports:
  - 81:80

Then http://localhost:81 shows my stuff with no issues whatsoever.

Matt Komarnicki
  • 4,370
  • 4
  • 31
  • 67

1 Answers1

5

OK, I've found information that Big Sur is shipped with Apache preinstalled.

macOS 11.0 Big Sur comes with Apache 2.4 pre-installed.

Stop it with: sudo apachectl stop

Prevent auto start with: sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

Matt Komarnicki
  • 4,370
  • 4
  • 31
  • 67