skip to Main Content

I’m trying to install the brew package httpd (apache). I’m so confused. Every time I do and navigate to http://localhost:8080 I get a big welcome screen that says "Welcome to Nginx." I don’t understand.

Am I running nginx and not apache? How could that be?

I’m on macOS 10.15.6.

I’m running pretty basic commands…

brew install openldap libiconv
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
brew install httpd
sudo brew services start httpd

And then I get get this…
https://www.dropbox.com/s/yia1yk9uhsootpk/Screen%20Shot%202020-09-18%20at%208.53.39%20PM.png?dl=0
"Welcome to nginx"

What don’t I know? A lot probably. If I edit the httpd.conf file to listen to another port, I get the same screen.

╰─ brew list                                                                            
apr     gettext     jemalloc    libidn2     node        powerlevel9k
apr-util    httpd       libev       libunistring    openldap    wget
brotli      icu4c       libevent    ncurses     [email protected] zsh
c-ares      jansson     libiconv    nghttp2     pcre        zsh-completions

Can anyone shed some light on this for me?

Update:

lsof -i :8080
COMMAND    PID  USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Bravex20 1225 user   35u  IPv6 0xcdbe6ccead8e5deb      0t0  TCP localhost:53261->localhost:http-alt (CLOSE_WAIT)

2

Answers


  1. Chosen as BEST ANSWER

    I think I narrowed it down to "groonga." First I'm hearing of it, but apparently it's a mariadb brew dependency. I found where the "welcome to nginx" text was coming from.

    var/www/index.html
    

    Not sure why it's hard coding that text if it will also display with apache running. Very confusing. However, it adds that file to the default apache DocumentRoot.


  2. Had a similar issue to this, discovered the fact that generic start file at usr/local/var/www/index.html, had been hard-coded to contain the "Welcome to nginx" when I installed nginx and
    the message remained that way even I uninstalled it. 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 🙂

    Similar problem also addressed here: nginx uninstalled, localhost:8080 still showing nginx welcome page

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search