3

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.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
Moti
  • 47
  • 1
  • 7

3 Answers3

5

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

127.0.0.1 localhost:7979

0

There is a process for adding port numbers to WAMPServer.

Using the wampmanager.exe icon in the system tray do the following

Right click wampmanager icon -> Tools -> Add a Listen port to Apache

enter image description here

This will throw a little dialog onto the screen, enter the port number you want to use, and that will be added to the httpd.conf file like this

Define MYPORT8082 8082

Into this section of the httpd.conf file

Like this

Define APACHE24 Apache2.4
Define VERSION_APACHE 2.4.52
Define INSTALL_DIR c:/wamp64
Define APACHE_DIR ${INSTALL_DIR}/bin/apache/apache${VERSION_APACHE}
Define MYPORT8082 8082
Define SRVROOT ${INSTALL_DIR}/bin/apache/apache${VERSION_APACHE}

If you add your port number like that, then change the httpd-vhosts.conf file to use the define on the VirtualHosts definition

<VirtualHost *:${MYPORT8082}>
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
-1

Windows Hosts File

Looks like the port number had to been included like the image above on the hosts file, no error messages now.

Moti
  • 47
  • 1
  • 7