macos – How to fix Apache 2.4’s Forbidden error?

0
20

[ad_1]

I am currently trying to run a local host servers on my macbook. I am using mac os’s built-in apache to do so. My OS is macOs Monterey 12.1. The error I ran into with apache is this:

1)Operation not permitted: [client 127.0.0.1:49553] AH00529: /Users/[my username]/Desktop/lab-compliance/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that ‘/Users/[my username]/Desktop/lab-compliance/public/’ is executable, referer: http://dev.labcompliance.com/

This is the webpage error message display

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

Here is the list of the directory/folder/file permission: [Starting from right to left]

-rw-rw-r–@ 1 [my username] staff 603 Jan 11 18:45 .htaccess

drwxr-xr-x 9 [my username] staff 288 Jan 20 23:21 public

drwxr-xr-x 28 [my username] staff 896 Jan 12 20:27 lab-
compliance

drwx——+ 19 [my username] staff 608 Jan 20 23:17 Desktop

drwxr-xr-x 5 root admin 160 Dec 7 2021 Users

Here is my apache conf files

httpd.conf

httpd.vhosts.conf

I have tried changing my files and folders to 755 and 644 and also adding directory in the httpd.conf files, but nothing seem to be working.

[ad_2]