Why does nginx listening port need to bring ip?
高洛峰
高洛峰 2017-05-16 17:09:46
0
4
759

][1]

As shown above, what is the significance of this? Doesn’t the server only have one external IP address? Does anyone have any specific application case description?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(4)
小葫芦

Basically, servers have more than one IP. For management and security reasons, the IDC computer room requires at least two network cards for a server, one for internal management and one for external services.

In fact, in order to fully meet the needs of virtualization, it is common for cloud hosts to be equipped with 7 or 8 network cards, not to mention those virtual network cards. Even virtual machines purchased through cloud services (such as Alibaba Cloud) usually have two virtual network cards, similar to the following:

Here is a public network address and an intranet address - it can also be seen from here that Alibaba Cloud does not use the traditional static NAT method to map the public IP to the intranet, but uses virtual network technology (or more fashionable One point, called SDN technology) directly assigns public IP addresses to virtual machines.

So software that provides network services can usually specify which IP address to bind to, preventing requests from other networks from accessing this service. Of course, Nginx can also provide the same service for requests from any network without specifying an IP.

習慣沉默

If your server has multiple network cards, you can set multiple IP addresses. The reason why IP is needed is because the socket monitoring needs to specify the address and port, so that the interaction between the programs knows who to send to (the IP address is specified) Host)

巴扎黑

You can also not specify the IP. If no IP is specified, it means monitoring the local IP.
Not all servers have only one external IP address.

刘奇

The server does not necessarily have only one internet IP

nginx may not be provided to external parties

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template