Open Terminal:
cd /etc/apache2
make a copy of all httpd.conf files (usually there is a httpd.conf, httpd.conf.pre-update, and httpd.conf.after-update):
cp /etc/apache2 ~/Desktop
Rename httpd.conf to something like httpd.conf.2020-update and then rename httpd.conf.pre-update to httpd.conf (link to a httpd.conf match):
sudo mv httpd.conf httpd.conf.2020-update
sudo mv httpd.conf.pre-update httpd.conf
Restart apache:
sudo apachectl restart
If that doesn’t work, cd to extra folder and replace httpd-vhosts.conf with previous or this file:
<Directory "/Users/mckenzierucker/blogs"> Options Indexes MultiViews FollowSymLinks AllowOverride All Require all granted </Directory> <Virtualhost *:80> VirtualDocumentRoot "/Users/mckenzierucker/blogs/sites/home/wwwroot" ServerName home.test UseCanonicalName Off </Virtualhost> <Virtualhost *:80> VirtualDocumentRoot "/Users/mckenzierucker/blogs/sites/%1/wwwroot" ServerName sites.test ServerAlias *.test UseCanonicalName Off </Virtualhost>
Save and restart apache.
If that doesn’t work, try deleting ‘Order allow,deny’ and ‘Allow from all’ lines and add ‘Require all granted’. Save and restart apache.
If that doesn’t work, vim httpd.conf file and uncomment this line:
LoadModule php7_module libexec/apache2/libphp7.so
If that doesn’t work, go back to /apache2 folder and sudo vim httpd.conf file and uncomment the include line with httpd-vhosts.conf (take out the #. Restart apache.
Include /private/etc/apache2/extra/httpd-vhosts.conf
If that doesn’t work, vim httpd.conf file and make sure this line is uncommented. Restart apache.
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
If that doesn’t work, make sure apache is turned on:
sudo apachectl stop
sudo apachectl start
From here on, do apachectl configtest and check this line by refreshing the browser when this is active:
tail -f /var/log/apache2/error_log
Don’t forget to try this line on your project’s dir too:
sudo chmod -R g+rwx wwwroot/; sudo chown -R _www:staff wwwroot/;
This is a good line to check that your config file is all good:
sudo chmod -R g+rwx wwwroot/; sudo chown -R _www:staff wwwroot/;
Another line to check:
tail -f /var/log/apache2/access_log