Find it in Apache's configuration file httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
Remove the front #
#Virtual hosts
#Include conf /extra/httpd-vhosts.conf
Remove the first The#
in front of the second line and then find the httpd-vhosts.conf file in the APacheconfextra
& lt; virtualHost*: 80 & gt;
serveradmin www.test.com documentsRoot " D:wampserverwwwYIIdigpagedigpagefrontendweb" ServerName www.test.com ErrorLog "logs/digpage.log" CustomLog "logs/digpage.com.log" common Pay attention to modifying the previous
Then restart Apache
If you develop locally and do not have a domain name you can edit the hosts file in the C:WindowsSystem32driversetc
file and add a line in it 127.0.0.1 www.test.com You can write any domain name
because when this machine accesses the domain name, it gives priority to access the one in the hosts file
Note: Different versions of Apache may be slightly different.