Assume that the local virtual machine IP is 192.168.23.128. If you want to use the domain name www.test01.com to access the virtual web server, you only need to configure the following:
In windows, edit the C:WindowsSystem32driversetchosts file and add the following content:
<code><span># nginxTest</span><span>192.168</span><span>.23</span><span>.128</span> www.test01.com <span># End nginxTest</span></code>
In Linux, edit the /etc/hosts file and add the following content:
<code><span># nginxTest</span><span>192.168</span><span>.23</span><span>.128</span> www.test01.com <span># End nginxTest</span></code>
The above introduces the Nginx series (nineteen) using domain names to access the local web server, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.