Apache2: Cannot access Userdir - Forbidden

I am trying to run Apache 2.4 on Ubuntu 21.10. However, I cannot get userdir to work. I did everything I can possibly google, except reinstalling apache. I am normally a Windows person, so this is driving me nuts.

What I did:

  • Enable userdir.conf
  • Set Permission of the folder public_html into 777, and change ownership to www-data
  • Add Require all granted to literally everywhere I can think of: apache2.conf, userdir.conf, and the config in sites-available to include
    <Directory /home/*/public_html >
     Require all granted
     AllowOverride All
     Options +Indexes 
   </Directory>   

Yet, for some reason, all I have is ERROR 403: Forbidden when trying to go to http://localhost/~myusername What could I possibly be missing? Thank you.


It turns out it is "because search permissions are missing on a component of the path". So just "chmod -R 755" my entire home folder. Probably not that good of a solution, but still, it works.