Reputation: 126
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:
rm -rf /usr/local/etc/nginx
sudo find / -name "nginx"
. Nothing shows up./Library/LaunchAgents/
and ~/Library/LaunchAgents/
but there's none.I'm on macos High Sierra.
Thanks!
Upvotes: 4
Views: 6556
Reputation: 61
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?
Upvotes: 4
Reputation: 1
Here's a solution as I was in the same predicament.First run
netstat -anv | egrep -w [.]8080.*LISTEN
I found out that the culprit was /usr/local/opt/httpd/bin/httpd. so I terminated the processes suing.
sudo killall httpd
All was well after that, port 8080 was finally free.
Upvotes: 0
Reputation: 115
It may be a service running use the below from the command line
$ sudo launchctl list - To see the list of services running
launchctl remove - To remove the service
Upvotes: 1