With nginx set up and connected to the Windows virtual machine

What is nginx

Nginx (engine x) is a high performance HTTP and reverse proxy server is a IMAP / POP3 / SMTP server. Nginx by Igor Saisuoyefu of Russia visited the second Rambler.ru site (Russian: Рамблер) developed the first public version 0.1.0 was released in 2004 October 4.

Its source code to BSD license issued in the form, because of its stability, rich feature set, simple configuration files and low system resource consumption is known. June 1, 2011, nginx 1.0.4 release.

Nginx is a lightweight Web server / reverse proxy server and e-mail (IMAP / POP3) proxy server, and released under a BSD-like agreement. It features occupy less memory, high concurrency, the ability to do concurrent nginx fact the same type of web server performance is better, mainland China use nginx web site users are: Baidu, Jingdong, Sina, Netease, Tencent, Taobao.

nginx arena

Nginx is a free, open-source, high-performance HTTP server and reverse proxy server; also a IMAP, POP3, SMTP proxy server; Nginx can publish treatment site as an HTTP server, in addition Nginx as reverse proxy load balancing

benefit

1.Nginx-based event-driven architecture, so that it can support millions of TCP connections level
2. The high degree of modularity and software licenses are free of third-party modules after another (which is an open source era ah ~)
3.Nginx is a cross-platform server, the operating system can run on Linux, Windows, FreeBSD, Solaris, AIX, Mac OS , etc.

Build Web Hosting

1. First into /usr/local/nginx/conf/nginx.conf configuration and location servre under http (if you want to build a plurality of peer to write from)
Configuration / etc / hosts

Ip      (设置的网址)

3. Create a directory and then under nginx in html. Nginx.conf name and configuration directory path inside location inside the same name, for example:

nginx.conf里的的是这样:
 location / {
            root   html/www;
            index  index.html index.htm;
        }
那么在html下:mkdir www

4. Create an index.html for example, and then to catalog:

echo “hello world” >> index.html

5. Go to the hosts, add our IP and domain name

vim /etc/hosts

0 6.setenforce
7.systemctl STOP firewalld
back to the nginx sbin check his grammar has no errors, and re-read

./nginx -t
./nginx -s reload

Windows of the building

1. Right-click Notepad, click to open as Administrator
2.Ctrl + o Select the hosts to open the file path:

C: /windows/system 32/divers/etc/hosts

3. Also Edit IP and domain name (IP to IP virtual machine)
4.Ctrl + S to save to turn off
5. Turn off the computer firewall
6. Turn the page enter your domain name

Guess you like

Origin blog.51cto.com/14375779/2416807