always has been my go-to spot for macOS upgrades and I'll be borrowing for some of the steps as it'll get you about halfway to enabling localhosts.

You'll need to either use a CLI utility like Nano or BBEdit. If using BBEdit, you will need to click the "Show Everything" box to view invisible files.

Step 1: Modify the httpd.conf

Open the httpd.conf

  sudo nano /etc/apache2/httpd.conf

Uncomment the following lines by removing the # in front of the line

  Include /private/etc/apache2/extra/httpd-vhosts.conf
  LoadModule vhost_alias_module libexec/apache2/
  LoadModule rewrite_module libexec/apache2/
  LoadModule php7_module libexec/apache2/

Step 2: Modify the Vhosts.conf

Open the vhost.conf (Note if you've upgraded, macOS should have the httpd-vhosts.conf~previous in the same directy) configuration

  sudo nano /etc/apache2/extra/httpd-vhosts.conf

Entries are added by using the following pattern.

  <VirtualHost *:80>
  DocumentRoot "/usr/docs/"
  ErrorLog "/private/var/log/apache2/"
  CustomLog "/private/var/log/apache2/" common

Here's an example of a working entry ported from macOS (OS X) 10.12.x

  <VirtualHost *:80>
        DocumentRoot "/Users/MYUSER/Development/website"

    <Directory  "/Users/MYUSER/Development/website">
                AllowOverride All
                Require all granted


Step 3: Map Localhost to hosts

Open the hosts file:

  sudo nano /etc/hosts

Important, this next step can vary quite a bit based on how you've mapped your vhosts URLs. I decided I want all instances of localhost AND (lvh being the acrnynom many developers use for local virtual host and the dot me suffix to reinforce that it is local). This is super common.	localhost

Step 4: Restart Apache

Regardless if you were using a GUI editor like BBEdit, you'll need to restart Apache via the command line

  sudo apachectl restart