1. Open the Apache directory httpd file (for example: C:\AppServ\Apache24\conf) with Notepad and locate the following module
# Virtual Hosts
#Include conf/extra/httpd-vhosts.conf
Remove the previous # so that the Httpd-vhosts virtual host file is turned on
2. Open the Httpd-vhosts file (for example: C:\AppServ\Apache24\conf\extra) in Notepad, and refer to the example in the Httpd-vhosts file to add the following
<virtualhost *:80>
DocumentRoot "C:\AppServ\www"
ServerName tp5.com
</VirtualHost>
3. Open the Hosts file (C:\Windows\System32\drivers\etc) with Notepad, and refer to the Hosts file for an example to add the following
127.0.0.1 tp5.com
4. If the Hosts file cannot be saved, modify the security permissions to
Step: Right--Properties---security---editor---add-now find---Add appropriate name, set corresponding permissions
Vhosts (virtual Host) configuration