Install Apache On Mac Catalina

Posted on  by 

Once you are sure that everything is correctly installed on your machine, you have to follow these steps to install Apache Spark. Step 1: Install scala brew install scala@2.11 Keep in mind you have to change the version if you want to install a different one Step 2: Install Spark brew install apache-spark Step 3: Add environment variables. Install and Configure Apache macOS 10.13 High Sierra and 10.14 Mojave come with Apache pre-installed. However, instead of using the delivered version we’re going to install Apache via Homebrew. It looks like Catalina overwrites the apache config files with default ones. I've found no trace of my old ones. I'm still hoping that it wasn't that stupid and that there is a backup of the old file somewhere but at the moment, I'm slowly rebuilding those files and any other dependancy that is connected.

  1. Install Apache On Mac Catalina Download
  2. Install Apache On Mac Catalina Update
  3. Install Apache Mysql Php On Macos Catalina 10.15
Mac

The title of this page is quite 'misleading' as both Apache and PHP comes pre-bundled in macOS Catalina 10.15. We merely need to configure them.

Press + SPACE (Spotlight Search) and bring up the terminal. Start as root

1) The Apache HTTP Server

As Apache 2.4 comes pre-packaged in macOS Catalina 10.15, check the version to verify

If the version number is proper, start the server by running the command

Next, type http://localhost in the URL bar of the web browser. It should display the It works! page.

2) The It works! Page Location

The default It works! page is located inside /Library/WebServer/Documents as the index.html.en file.

Install Apache On Mac Catalina

3) Changing the Work Directory

Get back to the login directory typing

Navigate to your home directory (it is named with your user name). In my case, it is dennisgabil

There, create a directory for your web projects, say Sites

For easy access later, you can place this newly created Sites directory in the Favorites section of your Mac's Finder. Do Spotlight Search ( + SPACE) on your username and drag and drop Sites to the Finder sidebar.

4) Modifying httpd.conf

Next, navigate to /etc/apache2

Install

Create a backup of the httpd.conf file

We need to make some changes to the httpd.conf file. Open it with vi editor

Find the line

#LoadModule php7_module libexec/apache2/libphp7.so

Macos

and uncomment it, i.e., remove # (focus the cursor on # and press x).

Then find the two lines below

DocumentRoot '/Library/WebServer/Documents'
<Directory '/Library/WebServer/Documents'>

and change them to

DocumentRoot '/Users/dennisgabil/Sites'
<Directory '/Users/dennisgabil/Sites'>

(You change /dennisgabil/ in the two paths to your /username/ ). For inserting text in vi, press i. Save the changes (press ESC, then : (SHIFT + :), then wq!)

Install apache on mac catalina download

Install Apache On Mac Catalina Download

5) Restart Apache

Restart the server by running the command

Now all your web projects can go inside /Users/dennisgabil/Sites. If you have a web project called, say, myproj, inside that directory, you can access it by typing localhost/myproj in the URL bar of your browser and it will display your default index.html (or index.php, keeping in mind that we are learning PHP) file. If you have a Git repository for your project, you can clone it there and work.

Install Apache On Mac Catalina Update

Just for the purpose of testing, create an index.php page that displays Hello, World! inside the /Sites directory (do not forget to change /dennisgabil to your /username in the path)

Install Apache Mysql Php On Macos Catalina 10.15

Access http://localhost. The page should display Hello, World!

Coments are closed