Find used Apache:

$ which -a httpd
/usr/local/bin/httpd
/usr/sbin/httpd

$ whereis httpd
/usr/sbin/httpd

which shows you both of your apache, whereis shows you the currently used apache

Internal Apache

  • Binary: /usr/sbin/httpd
  • Start/Stop: sudo /usr/sbin/apachectl start
  • Version: /usr/sbin/apachectl -v
  • Config: /etc/apache2/httpd.conf

Homebrew Apache

  • Binary: /usr/local/bin/httpd (symlink to ../Cellar/httpd)
  • Start/Stop: sudo /usr/local/bin/apachectl start
  • Version: /usr/local/bin/apachectl -v
  • Config: /usr/local/etc/httpd/httpd.conf

Homebrew Apache (Apple Silicon)

substitute /opt/homebrew for /usr/local in the group directly above. for example

  • Binary: /opt/homebrew/bin/httpd (symlink to ../Cellar/httpd)
  • Start/Stop: sudo /opt/homebrew/bin/apachectl start
  • Version: /opt/homebrew/bin/apachectl -v
  • Config: /opt/homebrew/etc/httpd/httpd.conf

Note: For me the Internal and the Homebrew Apache are at the same Version.

Answer from nito on Stack Exchange
๐ŸŒ
LEMP
lemp.io โ€บ how-to-check-apache-version-mac-os-x
How To Check The Version Number Of Apache On Mac OS X โ€“ LEMP
December 13, 2022 - Apache and nginx will be listed ... To check the version of Apache that is installed on a Mac, open the Terminal and type in the following command: apachectl -v....
Discussions

How do I determine what version of Apache I'm using?
Copy and paste this link into your browser. file:///Library/Documentation/Services/apache/index.html.html If you can find this page then the version will be indicated. More on discussions.apple.com
๐ŸŒ discussions.apple.com
July 2, 2007
macos - Changing default Apache version on Mac OS - Stack Overflow
A security sweep of my network (using Nessus) revealed that my mac is running a version of Apache (2.4.46) with a few critical vulnerabilities. I've been told I need to upgrade to at least 2.4.47. ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
centos - How can I tell what version of apache I'm running? - Unix & Linux Stack Exchange
Can confirm this works on Mac OS El Capitan. ... This does not work. It only figures out the apache version on the harddisk. Not the currently running one. ... This worked on GNU/Linux 9 (stretch). Thanks ! ... Works โ„ข for Ubuntu 18.04.4 LTS. ... Welcome to the site. Your answer seems rather similar to what @jsbillings proposed; would you mind to add some explanation on where your approach differs or what new aspect it tackles? ... The above check ... More on unix.stackexchange.com
๐ŸŒ unix.stackexchange.com
centos - How to check apache version - Stack Overflow
CentOS 6.9 There are 2 versions of apache are existing on my CentOS. One installed by "make install httpd", another installed by "yum install httpd". How do I check what version are running More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
Apple Community
discussions.apple.com โ€บ thread โ€บ 1021559
How do I determine what version of Apache I'm using?
July 2, 2007 - Copy and paste this link into your browser. file:///Library/Documentation/Services/apache/index.html.html If you can find this page then the version will be indicated.
๐ŸŒ
Vegastack
vegastack.com โ€บ tutorials โ€บ how-to-check-apache-version
How to Check Apache Version
October 10, 2023 - It can only be checked through command-line tools or by accessing server files and configurations. On macOS, you can open a terminal window and run the command httpd -v to check the Apache version.
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ web servers โ€บ how to check apache version
How to Check Apache Version | phoenixNAP KB
December 17, 2025 - Any version of Apache web server installed. Command-line access (for some methods). A cPanel/WHM account (for some methods). The easiest way to check the Apache version is via the terminal.
๐ŸŒ
nixCraft
cyberciti.biz โ€บ nixcraft โ€บ howto โ€บ apache โ€บ how to find out apache version using command
How To Find Out Apache Version Using Command - nixCraft
October 19, 2022 - This page explains how to check Apache version on Linux or Unix systems. The acronym LAMP refers the components of the solution stack composed entirely of free and open-source software as follows: ... Open terminal application on your Linux, Windows/WSL or macOS desktop.
Top answer
1 of 1
2

Two things here, how to set the default apache version, and whether your machine is vulnerable.

firstly, you can have multiple versions of apache installed, and even running simultaneously (listening on different ports). Installing homebrew apache, doesn't necessarily start the server automatically, or deactivate the default (apple) apache install.

You can see which versions of apache are running on your system by using the ps command, for example on my machine:

$ ps auxw | grep  httpd
_www               782   0.0  0.0 34153280   1476   ??  S    26May22   0:00.83 /usr/sbin/httpd -D FOREGROUND

and check the version:

$ /usr/sbin/httpd -v
Server version: Apache/2.4.53 (Unix)

The apple httpd service is started by launchctl, and you can stop the apple httpd service from automatically starting up as follows:

$ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

To automatically start homebrew apache on system startup (assuming you have already installed it - brew install httpd), run brew services start httpd

Remember that the apache configuration files will be in a different location - apple conf file is /etc/apache2/httpd.conf, whereas homebrew's is in /usr/local/etc/httpd/httpd.conf. Also the default port may well be different - apple defaults to port 80 whereas homebrew httpd listens on port 8080 by default.

Secondly, does this security issue actually matter? By default apache listens on all network interface, but unless you need to access the web server from another machine, it is safer to configure it to only listen on localhost. You can do this in the httpd.conf file, as follows:

Listen 127.0.0.1:80

This page has a good walkthrough of the various steps: https://wpbeaches.com/installing-configuring-apache-on-macos-using-homebrew/

Find elsewhere
๐ŸŒ
LEMP
lemp.io โ€บ how-to-check-apache-version-in-mac-os
How To Check Your Apache Version
May 4, 2022 - The LEMP stack has gained significant traction among developers and system administrators because Nginx handles concurrent connections more efficiently than Apache in many common scenarios. Nginx uses an event-driven, asynchronous architecture that serves static content extremely fast while consuming less memory per connection compared to Apache's process-based model.
๐ŸŒ
Anintegratedworld
anintegratedworld.com โ€บ how-to-find-out-apache-version-on-osx
How to find out Apache version on OSX? โ€“ An Integrated World
Server version: Apache/2.4.34 (Unix) Server built: Feb 22 2019 20:20:11 ยท To know where httpd is, you can also run: whereis httpd ยท Pingback: How to test the default Apache in OSX โ€“ An Integrated World ยท Search ยท Atlassian Authorized Instructor ยท Categories ยท
๐ŸŒ
Anintegratedworld
anintegratedworld.com โ€บ how-to-test-the-default-apache-in-osx
How to test the default Apache in OSX โ€“ An Integrated World
Apache is installed and enabled in OSX by default. To confirm and check your version instance, see this.
๐ŸŒ
Devxperiences
devxperiences.com โ€บ pzwp1 โ€บ 2021 โ€บ 01 โ€บ 05 โ€บ install-update-apache-httpd-2-4-462-on-mac-mojave
Install / Update a new Apache (httpd) server (version 2.4.462) on MAC Mojave using Homebrew โ€“ DevXperiences
January 5, 2021 - A. Check/inspect preinstalled Apache server on MAC ยท The macOS Mojave comes with Apache pre-installed. The preinstalled Apache version for [Mojave 10.14.5 (18F132)] is Apache/2.4.34 (Unix), and it is located into /etc/apache2 folder.
๐ŸŒ
UltaHost
ultahost.com โ€บ knowledge-base โ€บ check-apache-version-linux
How to Check Apache Version in Linux | Ultahost Knowledge Base
October 8, 2024 - Apache is a widely used, open-source ... and macOS. This cross-platform server supports several programming languages, such as PHP, Python, and Perl, which makes it useful for hosting websites and web applications. To ensure smooth performance and avoid unwanted issues, itโ€™s important to check your Apache version ...
๐ŸŒ
Liquid Web
liquidweb.com โ€บ home โ€บ 3 methods of checking apache version
3 Methods of Checking Apache Version | Liquid Web
November 19, 2024 - Are your curious about which Apache version your website is running? Our short, straightforward guide will help you check the Apache version using multiple methods.
๐ŸŒ
AlexHost
alexhost.com โ€บ home โ€บ faq โ€บ administration โ€บ how to determine the apache version on your vps
Check Apache Version on VPS Easily | AlexHost
October 7, 2024 - Enable mod_status: If not enabled, ... restart apache2`. Access the Status Page: Navigate to `http://your-server-ip/server-status` in a web browser to view Apache details....