Step 1:
1. Open C:/Windows/System32/drivers/etc
Step 2: modify the domain name resolution address
127.0.0.1 111cn.net # Example
Step 3: modify the apache http. conf file to support virtual hosts.
| The code is as follows: |
Copy code |
# Virtual hosts
Include conf/extra/httpd-vhosts.conf remove this same front-side well number if not added by yourself
LoadModule vhost_alias_module modules/mod_vhost_alias.so remove the forward well number if it is not manually added
|
Step 4: configure the vhost file
Find the/extra/httpd-vhosts.conf file
Step: add a VM
| The code is as follows: |
Copy code |
|
<VirtualHost *: 80>
DocumentRoot "C:/webroot/aaa.com"
ServerName 111cn.net
<Directory "C:/wamp/www/x6">
Options None
AllowOverride None
Order allow, deny
Allow from all
</Directory>
</VirtualHost> |
Bind a 111cn.net domain name, specify the program directory, and restart apache!