The first step:
Open the location of the apace installation file, find htpd.confin the Conf directory, and double-click Open .
Remove the # number before 516 lines
Step Two:
Open the Windows folder under System32 under the drivers under the ETC folder, under Etc file double hit open hosts
My file location in the computer C:\Windows\System32\drivers\etc
You can add your own virtual domain name, such as 127.0.0.2 o2o.xue.com
Step Three:
Find your own Apache directory under apache\conf\extra\httpd-vhosts.conf
Here line 44th to line 50 is the newly added virtual domain location
VirtualHost Here you need to configure your domain name and the consistency in your Hosts file
ServerAdmin The domain address you set yourself
DocumentRoot the entrance to your project
ServerName The domain address you set yourself
Errorlog logs/your domain address-error.log
Customlog logs/your domain address-access.log
Fourth Step:
After restarting the Apache server, you can access it, for example:
Configuration of the virtual domain name of PHP