看到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地址

转载于:https://www.cnblogs.com/mentalidade/p/6834755.html

Nginx的server为0.0.0.0/0.0.0.1的作用?相关推荐

  1. Windows Server 2008 R2 SP1 安装NET FrameWork 4.0 受阻滞问题解决办法。

    Windows Server 2008 R2 SP1 安装NET FrameWork 4.0 受阻滞问题解决办法. 参考文章: (1)Windows Server 2008 R2 SP1 安装NET ...

  2. HttpException: 503: Server Error for url:http://cic-1:9696/v2.0/security-groups, Service Unavailable

    1.报错信息 在部署openstack之后,创建安全组时,出现如下问题: Error while executing command: HttpException: 503, The server i ...

  3. openstack中 Server Error for url: http://controller:9696/v2.0/agents, Internal Server Error

    openstack之http://controller:9696/v2.0/agents, Internal Server Error [root@controller ~]# openstack n ...

  4. Retrying connect to server: xxx.xxx.xxx.xxx:8032. Already tried 0 time(s)

    Retrying connect to server: xxx.xxx.xxx.xxx:8032. Already tried 0 time(s) 这个问题笔者遇到时参考了网上很多答案,发现都不太对劲 ...

  5. OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f6cb1055000, 16384, 0) failed; erro

    背景 今天突然网站不能访问了. 赶紧重启下服务.发现提示服务未启动. 服务是什么时候关的呢? 赶紧把catalina.out文件下到本地. 然后开始定位问题点. 问题 找了半天,终于发现了问题 Ope ...

  6. 轻松解决2013 lost connection to mysql server at ‘reading initial communication packet‘, system error: 0“

    ##轻松解决 2013 lost connection to mysql server at 'reading initial communication packet', system error: ...

  7. 解决httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0

    httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for Se ...

  8. java基础巩固-宇宙第一AiYWM:为了维持生计,四大基础之计网_Part_1-2(HTTP1.0、1.1、2.0、3.0【谁比谁牛,牛在哪】;HTTP(S)、会话和饼干、权限)整起

    可以说计算机网络,就是玩那几层中的那些协议们,本层玩,本层玩完了跨层玩,跨层玩,跨层玩完了本层玩-不过上一篇网络分层后,还有些细节得好好看一下,比如: PART1-1:HTTP:HTTP 协议是基于 ...

  9. aix oracle 10.2.0.1 升级 10.2.0.4,安装oracle 10.2.0.4 on aix 6.1的不同之处

    根据Oracle Database Installation Guide 10g Release 2 (10.2) for AIX 5L Based Systems (64-Bit)文档,在AIX 6 ...

  10. Oracle 10g(10.2.0.4)升级到10.2.0.5.19

    一.将数据库版本从10.2.0.4 升级到 10.2.0.5,再升级到10.2.0.5.19 (1) 备份等过程略过,一个老库的升级过程,记录之.   (2) 一致性关闭数据库及监听 sqlplus ...

最新文章

  1. 马斯克教你的五步做事法
  2. 在Clojure中使用class
  3. 深入浅出计算机组成原理学习笔记:高速缓存(下)-你确定你的数据更新了么?(第38讲)...
  4. C++ new/delete、malloc/free
  5. 【学亮IT手记】SpringMVC增删改查+map数据返回Controller层代码示例
  6. Java 程序员必须了解的 7 个性能指标
  7. 程序员应该知道的那些画图工具-第一期
  8. jsp内置对象------session
  9. 网络克隆报a:\ghosterr.txt故障解决一例
  10. ios之最简单的程序
  11. Docker+Teamcity+Maven+SVN搭建持续集成环境
  12. 更小的刘海和更宽的5G天线,下一代iPhone你期待吗?
  13. Phome开发历程分享——Enjoy the Beginning
  14. ngrok技术原理及下载使用
  15. win7电脑无线网卡服务器,win7如何安装无线网卡驱动|win7安装无线网卡驱动的方法...
  16. 在vscode和android studio中安装代码注释翻译插件
  17. 利用Matlab App Designer简单设计程序
  18. 读书笔记(一)数联网——大数据如何互联
  19. Microsoft buildup new website for open-source project
  20. 八股文写春联会是什么样子?

热门文章

  1. 【工业控制】激光跟踪仪概述
  2. 【Qt】QModbusDevice类
  3. 【Tiny4412】设置Uboot提示符和关闭MMU
  4. 【Tools】gcc4.4升级到gcc4.8
  5. python 读取word 题库_Python-docx 读取word.docx内容
  6. druid连接池初始化慢_从零开始手写 mybatis (三)jdbc pool 从零实现数据库连接池
  7. 安卓蓝牙键盘按键映射_多设备无缝切换 雷柏XK100无线蓝牙轻薄键盘评测
  8. 定时任务提交spark到yarn出现一直accepted以及yarn出现unhealthy情况
  9. booloader编写
  10. 机器学习中的算法(2)-支持向量机(SVM)基础