nginx how to configure multiple virtual machines

Nginx is a high-performance HTTP and reverse proxy server is a IMAP / POP3 / SMTP proxy server.
Nginx is a lightweight Web server / reverse proxy server and e-mail proxy server, and released under a BSD-like agreement. Developed by programmers lgor Sysoev of Russia, for the Russian large-scale web portal and search engine Rambler use. It features occupy less memory, high concurrency, the ability to do concurrent nginx fact the same type of web server performance is better.

VM (Virtual Machine) refers to a complete hardware system functions, run a full computer system through software simulation in a completely isolated environment.
Virtual system by creating a new virtual mirror existing operating system, it has a real windows system exactly the same function, into the virtual system, all operations are in this new independent virtual system which conduct can be installed stand-alone software, save data, have their own independent desktop, will not have any impact on the real system, but also a kind of operating system the flexibility to switch between the existing system and virtual images. Virtual systems and traditional virtual machine (Parallels Desktop, Vmware, VirtualBox, Virtual pc) except that: the system does not degrade the performance of Virtual PC, start the virtual system does not boot windows system like that takes time, run programs faster and more convenient; virtual the system can simulate the same conventional operating system environment, the virtual machine can simulate other types of operating systems; and virtual machine instructions need to simulate the underlying hardware, the virtual system is much slower than the speed on the application.

Today, we learn about how to configure multiple virtual machines nginx

**1**.先安装nginx,完成之后进入cd /usr/local/nginx

2. enter cd conf -------> ls

**3**.vim nginx.conf

nginx how to configure multiple virtual machines
nginx how to configure multiple virtual machines
nginx how to configure multiple virtual machines

4. Exit conf ------------> cd .. --------> ls

5 . Creating www, bbs and blog ------------> mkdir www ---------> mkdir bbs ------------> mkdir blog

6. enter that created three directories --------------> cd the WWW -------> LS
vim index.html
nginx how to configure multiple virtual machines
look at cat
nginx how to configure multiple virtual machines

BBS ----------- cd> LS
vim index.html
nginx how to configure multiple virtual machines
in cat look
nginx how to configure multiple virtual machines

Blog ----------- cd> LS
vim index.html
nginx how to configure multiple virtual machines
in cat look
nginx how to configure multiple virtual machines

7 .pwd look at the path

8. cd .. Exit ---------> ls look

9. enters inside cd conf

10 .vim create ---------> vim / etc / hosts
nginx how to configure multiple virtual machines

11. cd .. Exit --------> ls View

12. enter cd sbin inside -----------> ls View

13. ps aux | grep nginx
nginx how to configure multiple virtual machines

14. The detection configuration file syntax is correct ./nginx -t
nginx how to configure multiple virtual machines
appeared successful, said correct

15. The ./nginx -s reload restart

16 . Turn off the firewall Systemctl stop firewalld

17. Open Notepad (Run as Administrator)
to open the c drive -------> system32 -------> drivers -------> etc -------- -> hosts (note !!! if not, then all the lower right corner there is a file)
nginx how to configure multiple virtual machines
-------> add ip address and domain name (in the last line of
192.168.119.129 www.nautilus.org) ----- -> then enter the browser after save, view
nginx how to configure multiple virtual machines

18. Enter www.nautilus.org in the browser
nginx how to configure multiple virtual machines
indicates correct

In the browser input bbs.nautilus.org
nginx how to configure multiple virtual machines
said right

In the browser input blog.nautilus.org
nginx how to configure multiple virtual machines
said right

Guess you like

Origin blog.51cto.com/14259161/2416276