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

WBOY
Release: 2016-08-08 09:23:47
Original
1173 people have browsed it

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>
Copy after login
Copy after login

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>
Copy after login
Copy after login

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!