Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx uninstalled, localhost:8080 still showing nginx welcome page

I uninstalled nginx from brew using brew uninstall nginx, but when I go to http://localhost:8080, I still get the "Welcome to Nginx" message.

What I already did:

  • Restarted my computer (3 times)
  • Removed extra nginx folder using rm -rf /usr/local/etc/nginx
  • Looking for nginx everywhere from root folder using sudo find / -name "nginx". Nothing shows up.
  • Looking for nginx .plist files in /Library/LaunchAgents/ and ~/Library/LaunchAgents/ but there's none.

I'm on macos High Sierra.

Thanks!

like image 837
Michael S. Avatar asked Nov 04 '25 11:11

Michael S.


1 Answers

Had this annoying problem as well, discovered it was the httpd package that also made this page appear even after nginx was uninstalled.

Though forcefully shutting down/uninstalling httpd would resolve the issue on the surface, the root issue is actually the fact that generic start file at usr/local/var/www/index.html, has been hard-coded to contain the "Welcome to nginx" message and will remain that way even after nginx is uninstalled. The Apache (httpd) service also happens calls that index.html file upon startup which makes it appear as if it were nginx rendering that file.

Not too sure why nginx doesn't automatically empty the file upon uninstallation but just manually change/remove the contents of that file after uninstalling nginx and your problem should be fixed :)

This post also addresses a similar issue: Brew Install Httpd: Welcome to Nginx?

like image 174
Anightingale Avatar answered Nov 06 '25 02:11

Anightingale



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!