How to Apache server on your Mac M1

Here are the steps to install the Apache server on your Mac M1:

  • Open Terminal from the Applications > Utilities folder.
  • Install Homebrew by running the following command in the Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Once Homebrew is installed, you can use it to install Apache by running the following command in the Terminal:

2-day Python learning plan that covers the basics of Python programming language:

brew install httpd
  • After the installation is complete, start the Apache server by running the following command in the Terminal:
sudo apachectl start

You may need to enter your admin password.

  • Check if the Apache server is running by opening a web browser and going to http://localhost. If you see the “It Works!” message, then the Apache server is running.
  • By default, the web root directory for Apache is located at /usr/local/var/www. You can test it by creating a simple HTML file in this directory and opening it in a web browser.

That’s it! You have successfully installed and started the Apache server on your Mac M1.

1 thought on “How to Apache server on your Mac M1”

  1. Pingback: How To install an Apache server from the terminal on a Linux distribution - Python GDB

Leave a Comment