Install Apache Macos Catalina

Can you install macOS Catalina on an external SSD connected to your Mac? Yes, it's definitely possible. However, since Apple initiated a relatively new partition scheme (APFS) with macOS High Sierra, the process is slightly different than with older versions of macOS. Clean installing is normally a personal preference. But when it comes to macOS Catalina, it may be a good idea. Some users recommend a clean install every time you update to a major operating system update (macOS Mojave, macOS Catalina, etc.). Install MySQL on macOS Catalina. Download and install the latest MySQL generally available release DMG for macOS. MySQL 8 is the latest version. But older versions are available if you need to support older applications. When the install completes it will provide you with a temporary password. Copy this password before closing the installer.

Question or issue on macOS:

I have Apache webserver (the one supplied by Apple) running on my Macbook and it ran flawlessly, until I upgraded to Catalina 10.15.
I used the same httpd.conf, but now it is displaying

You don’t have permission to access this resource.Server unable to read htaccess file, denying access to be safe

I thought is was folder access by Catalina, but I don’t know how to let Apache access the web root folder (which is inside my /Users/me/Documents folder)as Apache is not a normal /Application.

Port 80 is open when I check with lsof -nP -i4TCP:80 | grep LISTEN op nmap, so Apache does start.

I set a simple index.html in the root folder, but the problem persists.
And when I remove the .htaccess from the Apache root folder I get:

You don’t have permission to access this resource.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

What can be the problem here ?

Install apache on macos catalina

How to solve this problem?

Solution no. 1:

I have found the solution, myself.

It is a Catalina issue:

  1. Go to System Preferences => Security & Privacy => Full Disk Access
  2. Click on the “+” button to add an app and go to the root folder of the disk and press
    Cmd + Shift + .(dot)
  3. Go to /usr/sbin/ and select httpd.

That worked for me.

Solution no. 2:

i had the same error, the problem in my case was that macOS Catalina comes with the php module disable by default, in the error log apear as:

tail /private/var/log/apache2/error_log


[Wed Feb 26 18:10:57.123036 2020] [autoindex:error] [pid 3145] [client
127.0.0.1:53734] AH01276: Cannot serve directory /Library/WebServer/Documents/subdir/: No matching DirectoryIndex
(index.html) found, and server-generated directory index forbidden by
Options directive

the apache server was loking for index.html instead of index.php so it was blocking the list directory, I uncommented the line #LoadModule php7_module libexec/apache2/libphp7.so in /etc/apache2/httpd.conf and restart the apache server


sudo apachectl restart

and it just work. hope it helps.

Solution no. 3:

The above answer save my life!

I tried all the different Apache configs possible, nothing worked.

Just a small correction for step 2 – click on the “+” sign to add an app, navigate to the root folder then press Cmd + Shift + .(dot) which will show all hidden folders and allow you to see the folder in step 3 (/usr/sbin/)

I wish Apple would have at least shown some error in such a case…

Solution no. 4:

Mac catalina apache forbidden issue

Step 1: sudo code /etc/apache2/httpd.conf

Step 2:search for line #LoadModule php7_module libexec/apache2/libphp7.so
and uncomment no need to delete it.

Step 3: sudo apachectl restart

Step 4: open Web browsers type localhost

Step5: Done

Hope this helps!

This article shows how to install Maven (3.6.3) on macOS Big Sur (version 11.1).

Topics

Related Articles

1. Homebrew install Maven on macOS

1.1 Install Homebrew, a package manager on macOS.

1.2 The command brew install maven will install the latest Maven.

Terminal

1.3 Done. The Maven is installed on macOS.

P.S At the time of writing, the latest Maven version is 3.6.3

1.4 Where does Homebrew installed the Maven?
The brew will install the Maven packages at /usr/local/Cellar/maven/${version}

Terminal

The brew also creates shortcut or symbolic links at /usr/local/opt/maven/

1.5 Where does Homebrew put the Maven configuration file, settings.xml?
The settings.xml is available at /usr/local/opt/maven/libexec/conf

Install Apache Macos Catalina Operating System

Terminal

1.6 Where does Homebrew put the core mvn executable file?
The mvn is at /usr/local/bin/

Terminal

1.7 brew info maven to show the detail of the Maven package.

1.8 brew list maven

Macos
Terminal
Install apache on macos catalina

1.9 Useful commands:

  • brew upgrade maven to upgrade Maven.
  • brew uninstall maven to uninstall Maven.

2. Install Maven Manually

If Homebrew failed you or you don’t want the black-box magic, try to install the Maven manually.

2.1 Download the Maven, for example apache-maven-3.6.3-bin.tar.gz

2.2 The below command extracts the downloaded .tar.gz file to the current user’s home directory ~

2.3 Now, the Maven folder is at this path /Users/mkyong/apache-maven-3.6.3

Terminal

2.4 On macOS 10.5 Catalina or later, the default shell is zsh, and we can create the environment variables MAVEN_HOME and update the PATH in ~/.zshenv.

Open the ~/.zshenv and append the following content.

Install Apache Macos Catalina Download

Note
For macOS 10.14 Mojave and before, the default Terminal shell is bash, and we can create the environment variables in ~/.bash_profile.

Open the ~/.bash_profile and append the following content.

~/.bash_profile

P.S Read this Zsh Startup Files.

2.5 Source the ~/.zshenv to reflect the changes.

2.6 Verification.

Install Apache Macos Catalina Free

Terminal

Done.

References

Install Apache On Macos Catalina

mkyong

Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.