Remote access forbidden but localhost works with Apache

Solution 1:

By following the tutorial, you have created the file /etc/apache2/users/username.conf which contains the following:

<Directory "/Users/username/Sites/">
AllowOverride All
Options Indexes MultiViews FollowSymLinks
Require host localhost
</Directory>

(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:

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

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