Apache 403 error after Big Sur upgrade (Forbidden - You don't have permission to access this resource)

After upgrading my machine from Catalina to Big Sur, I can no more use a custom folder for my apache Server.

I can still use the default Sites folder.

<Directory "/Users/username/Sites/">
    AllowOverride All
    Options Indexes MultiViews FollowSymLinks
    Require all granted
</Directory>

But as soon as I change it to any other folder, like for example /Users/username/Development/Sites/:

<Directory "/Users/username/Development/Sites/">
    AllowOverride All
    Options Indexes MultiViews FollowSymLinks
    Require all granted
</Directory>

I get a 403 error: Forbidden - You don't have permission to access this resource.

I checked the permissions I have in /Users/username/Sites/

enter image description here

And tried to replicate them to /Users/username/Development/Sites/, but can not use system as user when doing sudo chown system /Users/username/Development/Sites

I also tried to use _www user, but it didn't work.

My other computer that is still under Catalina, has exactly the same configuration and permissions and it works pretty fine!

What did I miss??


Solution 1:

Although I had rights for my folder (and tried the chmod solutions also), it couldn't work for me.

What I found to work is to edit the User and group that runs the httpd conf file:

in httpd.conf file, change:

<IfModule unixd_module>
  User yourusername
  Group _www
</IfModule>

Save and restart Apache.