My local apache was working fine until it wasn't π€·ββοΈ I'm not sure at what point stopped working, my guess is after I updated to High Sierra.
In any case, here are some tips I found across different sites that worked for me π¨βπ»
1οΈβ£ Users
sudo nano /private/etc/apache2/extra/httpd-userdir.conf
Code language: PHP (php)
Remove the # from:
#Include /private/etc/apache2/users/*.conf
Code language: PHP (php)
2οΈβ£ Main configuration file
sudo nano /etc/apache2/httpd.conf
Look for and change this:
Options FollowSymLinks Multiviews
Add Indexes at the endπ
Options FollowSymLinks Multiviews Indexes
3οΈβ£ Verify DocumentRoot
In the same main configuration
sudo nano /etc/apache2/httpd.conf
It should look similar to π
DocumentRoot "/Library/WebServer/Documents"
<Directory "/Library/WebServer/Documents">
Options FollowSymLinks Multiviews Indexes
MultiviewsMatch Any
AllowOverride All
Require all granted
</Directory>
Code language: PHP (php)
(You probably will have comments in-between)
4οΈβ£ Restart apache
sudo apachectl restart