This article describes how Apache implements a local generic domain name virtual host. Share to everyone for your reference, specific as follows:
Create a generic domain name virtual host locally, you can modify the Apache installation directory under the Conf/httpd.conf, as follows:
<virtualhost *:80>
ServerName auciou.com
serveralias *.auciou.com documentroot F:/site/auciou
</VirtualHost>
Restart Apache, you can use auciou.com and xxx.auciou.com local access at the same time, XXX for arbitrary level two domain name, the implementation of the pan-domain name resolution. Using this method, you can also create a virtual host that is a generic domain name resolution for multiple domain names locally.
In the local test, you need to modify the Hosts file , open the C:\WINDOWS\system32\drivers\etc\hosts, write this sentence:
127.0.0.1 ww2.auciou.com
127.0.0.1 ww3.auciou.com
127.0.0.1 ww4.auciou.com 127.0.0.1 wwa.auciou.com
127.0.0.1 user.auciou.com
127.0.0.1 blog.auciou.com
Because the hosts themselves do not have a pan-domain name resolution, so in the local test, two domain name needs to be in the local hosts file one one Add. Then manually back up the hosts file, after reloading the system, overwrite this file.
I hope this article will help you with your Apache server settings.