Apache not working with user Sites folder on macOS 10.13 High Sierra
Solution 1:
This worked for me when I ran into the same problem.
Please check "/private/etc/apache2/extra/httpd-userdir.conf" file.
change
#Include /private/etc/apache2/users/*.conf
to
Include /private/etc/apache2/users/*.conf
and restart apache.
From: https://stackoverflow.com/questions/39631351/apache-localhost-403-forbidden-with-macos-sierra
Solution 2:
To allow access to the Sites directory, you have to add the following to /etc/apache2/httpd.conf
:
<DirectoryMatch "/Users/.*/Sites">
Require all granted
</DirectoryMatch>
The default Apache configuration is set to denied on /, so you have to explicitly allow access to everything.
Solution 3:
Just to expand on to Diogo Lima's answer.
With the upgrade to High Sierra, Apple made copies of your previous apache settings and appended a ~previous to the *.conf files both in the /etc/apache2 and the /etc/apache2/extra folders. If you are using virtual hosts or ssl-virtual hosts then you will need to also move your previous versions for those .conf files as well.
mv /etc/apache2/extra/httpd-vhosts.conf~previous /etc/apache2/extra/httpd-vhosts.conf
mv /etc/apache2/extra/httpd-ssl.conf~previous /etc/apache2/extra/httpd-ssl.conf