I don't understand the need for the hostnames in the host computer's host file? As a test, I created two conf files (I have pasted one below, please let me know if my changes are acceptable) for two existing Drupal projects, and they worked fine, without any special hostname support. I eliminated the .conf file directive that was specific to the hostnames.

Can you explain the purpose or need for the hostnames? The only advantage I can see is you can type a url in the browser rather than an IP address. But that doesn't seem to of great benefit, I just make shortcuts to the sites I am working on in each Browser's bookmarks bar.

My conf file:

<VirtualHost *:8082>
  DocumentRoot /var/www/example_site
  RewriteEngine On
  
  <Directory /var/www/example_site>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
  
  <Directory />
    Options FollowSymLinks
    AllowOverride None
  </Directory>

  <Location /server-status>
    SetHandler server-status

    Order Allow,Deny
    Allow from all
  </Location>

  LogLevel info
  ErrorLog /var/log/apache2/example_site-error.log
  CustomLog /var/log/apache2/example_site-access.log combined

  RewriteEngine On
  RewriteLog /var/log/apache2/example_site-rewrite.log
  # level 0 => Do not log rewrite
  RewriteLogLevel 0

</VirtualHost>