I recently was volunteering for a company to help out with some development in my free time. They had me run some scripts to prepare for the development. All of their development is through Docker. I ran the scripts and hit http://localhost and got the website just fine. However, even after I quit all running containers, quit docker, restarted the computer, and used incognito http://localhost still shows their website. My understanding was that you had to have a server running to serve localhost but I don't believe anything is running given everything I did. Is there somehow a way to serve a default page for localhost without a server? For example, maybe change some files to serve some HTML content and js by default? For context, I'm using a Mac and I couldn't find any questions similar to this. Any information would be helpful! Please be specific about which details to share if you don't think this is detailed enough.

Additional Info: For more information, I was able to find two processes running on port 80 thanks to the comment. I tried stopping apachectl which didn't work. "/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find a specified service" I found out info using sudo launchctl list | grep PID_num and it came back with "198 0 homebrew.mxcl.haproxy" which must be what's serving it. Every time I kill the processes running on port 80 it just comes back with a new PID immediately. This post was relatively helpful Killing an unknown self restarting server on port 80 Mac OSX. However, I couldn't stop apachectl or delete them so the page is still being served on port 80. I just now know it's ha.proxy.

I read this on the haproxy documentation "-sf/-st [pid ]* finishes/terminates old pids." and I tried running "haproxy -st 5039" where 5039 was the PID number and nothing happened.

I read this https://superuser.com/questions/159486/how-to-kill-process-in-mac-os-x-and-not-have-it-restart-on-its-own and ran this command which finally killed it. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.haproxy.plist

However, it came back with another command started by "Google" on port 80.... Not sure how to get rid of this one.

  • Please share more details. If the Docer containers are not running, their content is not accessible. Have you checked whether any other server is running?
    – Nico Haase
    Nov 1, 2021 at 15:57
  • If you used port 80 to access the website, why didn't you check whether any process is running on that port?
    – Nico Haase
    Nov 1, 2021 at 17:19
  • 2
    Run sudo lsof -i :80 | grep LISTEN and see if it shows something listening for (& serving) http connections. There's some more useful info here: "Killing an unknown self restarting server on port 80 Mac OSX". Nov 1, 2021 at 17:46
  • Thanks, @GordonDavisson, that helped although the problem is still present.
    – Chris
    Nov 1, 2021 at 18:36

1 Answer 1


Absolutely, you have an application which run web server at startup. Localhost means your working PC and each docker has a different IP than your local PC.

Check your PC to see if apache is started and stop it by:

sudo /usr/sbin/apachectl stop

Also check your startup programs or services to see which programs run it. For example Xampp which install Apache Server in your PC.

See this answer to check where is localhost folder located in Mac or Mac OS X.