Home  >  Article  >  Backend Development  >  Nginx series (nineteen) uses domain names to access the local web server

Nginx series (nineteen) uses domain names to access the local web server

WBOY
WBOYOriginal
2016-08-08 09:23:471204browse

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn