Problem copying WordPress site to localhost server

The web server, apache in your case, is listening on port:80 on your localhost.

You can tell apache to serve one particular folder based on request name (let’s call it virtual host).

To teach apache about that, explore your apache folder (apache/conf/extra/httpd-vhosts.conf) and add :

<VirtualHost *:80>
  DocumentRoot "/www/example1"
  ServerName www.example.com
</VirtualHost>

more info https://httpd.apache.org/docs/2.4/vhosts/examples.html