Nginx的server为0.0.0.0/0.0.0.1的作用?
看到kong默认的代理和后台server 都是0.0.0.0,代理到上游的服务器proxy_pass $upstream_scheme://kong_upstream;
配置如下,
upstream kong_upstream {
server 0.0.0.1;
balancer_by_lua_block {
kong.balancer()
}
keepalive 60;
}
监听的IP地址设置了 0.0.0.0 就表示你的nginx服务器监听本机的所有IP地址上,通过任何一个IP地址都可以访问到.
当发送数据的一方还不知道接收方的IP地址时,会在目的IP地址字段中使用0.0.0.0,表示未知IP地址(有时还用于表示无效IP地址)。
In the Internet Protocol Version 4, the address 0.0.0.0 is a non-routable meta-address used to designate an invalid, unknown or non-applicable target. To give a special meaning to an otherwise invalid piece of data is an application of in-band signaling.
In the context of servers, 0.0.0.0 means "all IPv4 addresses on the local machine". If a host has two IP addresses, 192.168.1.1 and 10.1.2.1, and a server running on the host listens on 0.0.0.0, it will be reachable at both of those IPs.
In the context of routing, 0.0.0.0 usually means the default route, i.e. the route which leads to "the rest of" the internet instead of somewhere on the local network.
wiki地址
Nginx的server为0.0.0.0/0.0.0.1的作用?的更多相关文章
- Nginx安装及支持https代理配置和禁用TSLv1.0、TSLv1.1配置
Linux安装Nginx Nginx安装及支持https代理配置和禁用TSLv1.0.TSLv1.1配置. 下载安装包 [root@localhost ~]# wget http://nginx.or ...
- 使用Linux、Nginx和Github Actions托管部署ASP.NET Core 6.0应用
使用Linux.Nginx和Github Actions托管部署ASP.NET Core 6.0应用 前言 本文主要参考微软这篇文档而来 Host ASP.NET Core on Linux with ...
- MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
最近远程连接mysql总是提示 Lost connection 很明显这是连接初始化阶段就丢失了连接的错误 其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配 ...
- 虚拟机中MySQL连接问题:Lost connection to MySQL server at 'reading initial communication packet, system error: 0 以及 host is not allowed to connect mysql
环境:在VirtualBox中安装了Ubuntu虚拟机,网络使用了NAT模式,开启了端口转发. 局域网内其他计算机访问虚拟机中的MySQL Server出现两个问题: Lost connection ...
- 重启Apache报错apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting的解决方法
启动apache提示 : apache2: Could not reliably determine the server's fully qualified domain name, using 1 ...
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName的解决
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ...
- nginx 安装手记 分类: Nginx 服务器搭建 2015-07-14 14:28 15人阅读 评论(0) 收藏
Nginx需要依赖下面3个包 gzip 模块需要 zlib 库 ( 下载: http://www.zlib.net/ ) zlib-1.2.8.tar.gz rewrite 模块需要 pcre 库 ( ...
- Lost connection to MySQL server at ‘reading initial communication packet', system error: 0 mysql远程连接问题
在用Navicat for MySQL远程连接mysql的时候,出现了 Lost connection to MySQL server at ‘reading initial communicatio ...
- The thumbprint of same asymmetric key is not same in 'SQL Server Connector for Microsoft Azure Key Vault' 1.0.4.0 and 'SQL Server Connector for Microsoft Azure Key
https://support.microsoft.com/en-us/help/4470999/db-backup-problems-to-sql-server-connector-for-azur ...
- SSL安装方法一:在Windows Server 2008安装SSL证书(IIS 7.0)
购买的是GlobalSign 公司的通配符域名型SSL 大致的意思就是“通配符公用名填写*.域名.com,这个下面的所有子域名是不受数量限制的,*可以换成任意字符” 1 生成数字证书签名请求文件(CS ...
随机推荐
- springboot生成表结构
https://blog.csdn.net/yalishadaa/article/details/59656332
- 1079 Total Sales of Supply Chain (25 分)(树的遍历)
给出一颗销售供应的树,树根唯一.在树根处货物的价格为p,然后从根节点开始没往结点走一层,该层的货物价格将会在父节点的价格上增加r%.给出每个叶节点的货物量求出他们的价格之和 #include<b ...
- springbootday06 mysql
一.MySql 1. 数据库概述 数据库( Database )是按照数据结构来组织.存储和管理数据的仓库 . 数据按照特定的格式存储起来,用户可以通过SQL (Structured Query La ...
- php设计模式 工厂模式和单例
1.单例模式//让该类在外界无法造对象//让外界可以造一个对象,做一个静态方法返回对象//在类里面通过让静态变量控制返回对象只能是一个. class cat{ public $name; privat ...
- Android记事本开发01
今天: 学习一下Android的基本知识,了解一下记事本开发大概需要哪些知识. 昨天: 无 遇到的问题:
- 团队Alpha版本冲刺(四)
目录 组员情况 组员1(组长):胡绪佩 组员2:胡青元 组员3:庄卉 组员4:家灿 组员5:凯琳 组员6:丹丹 组员7:何家伟 组员8:政演 组员9:鸿杰 组员10:刘一好 组员:何宇恒 展示组内最新 ...
- poj 1459 网络流问题`EK
Power Network Time Limit: 2000MS Memory Limit: 32768K Total Submissions: 24930 Accepted: 12986 D ...
- SqlHelper——数据库小助手
SqlHelper其实就是一个类. 早就听说过"SqlHelper"这个名词,也查过相关的资料,但还是一头雾水.当真的去实践去用它时,就会发现其实它没那么神秘. 当敲第一个窗体的时 ...
- 【bzoj2079】[Poi2010]Guilds 构造结论题
题目描述 Zy皇帝面临一个严峻的问题,两个互相抵触的贸易团体,YYD工会和FSR工会,他们在同一时间请求在王国各个城市开办自己的办事处.这里有n个城市,其中有一些以双向马路相连,这两个工会要求每个城市 ...
- 【bzoj3668】[Noi2014]起床困难综合症 贪心
原文地址:http://www.cnblogs.com/GXZlegend/p/6797090.html 题目描述 21 世纪,许多人得了一种奇怪的病:起床困难综合症,其临床表现为:起床难,起床后精神 ...