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.
at your Host's file - C:\Windows\System32\drivers\etc, you can add or edit your first line:
127.0.0.1 localhost:7979
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
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}>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.