1. Enable httpd-vhosts.conf In the httpd. conf file
Remove #, that is
# Virtual hosts (virtual host) include CONF/extra/httpd-vhosts.conf
2. Set up a VM in the D:/WWW directory (a site needs to be established in advance)
3. Set the http-vhosts.conf file (Path: X:/apachex. X/CONF/extra/http-vhosts.conf)
Add the following content:
# Configure the virtual host <virtualhost 127.0.0.1: 80> DocumentRoot "D:/www/Web" # configure the directoryindex index.html index.htm index on the welcome homepage. php <directory/> options followsymlinks # Do not allow others to modify the website page AllowOverride none # Set the access permission order allow, deny allow from all </directory> </virtualhost>
4. Add the IP ing between our IP address and host in the hosts file (Path: C:/Windows/system32/Drivers/etc/hosts)
Add the following address under 127.0.0.1 localhost:
127.0.0.1 www.xxxx.com
Configuration complete!