Remote access forbidden but localhost works with Apache I followed this tutorial and the Apache server works locally. http://localhost/~user/ works but remotely http://my-ip/~user I get:

Forbidden.
You don't have permission to access this resource.


Note that I am using the same computer. It used to work with Mojave. How can I fix this?
By following the tutorial, you have created the file /etc/apache2/users/username.conf which contains the following:

&lt;Directory "/Users/username/Sites/"&gt;
AllowOverride All
Options Indexes MultiViews FollowSymLinks
Require host localhost
&lt;/Directory&gt;


(note that you've replaced "username" with your actual username)

If you want to allow the public access to the folder, change it to look as follows:

&lt;Directory "/Users/username/Sites/"&gt;
AllowOverride All
Options Indexes MultiViews FollowSymLinks
Require all granted
&lt;/Directory&gt;


Note that the "Require" line was changed to "Require all granted".