Wampserver - The ServerName localhost:7979 is not defined into hosts file

WampServer Virtual Hosts

Here's the config file - C:\wamp64\bin\apache\apache2.4.51\conf\extra\httpd-vhosts.conf

# Virtual Hosts
#
'''
<VirtualHost *:7979>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

Host's file - C:\Windows\System32\drivers\etc

127.0.0.1 localhost
::1 localhost

I can access my project's fine, it's just on the homepage it's bringing this error.


Solution 1:

at your Host's file - C:\Windows\System32\drivers\etc, you can add or edit your first line:

127.0.0.1 localhost:7979