当前位置:网站首页>在开发或调试IP直接方案时需要注意Host的值跟直接的IP要一致
在开发或调试IP直接方案时需要注意Host的值跟直接的IP要一致
2022-07-25 04:05:00 【喜欢踢足球的老罗】
问题注意
如题,如果不一致可能会遇到502或其它认验失败的情况,不管是http还是https都要注意这个问题!在http的场景下可能服务侧的Nginx会配置规则,如允许IP直接但Host字段值必须跟IP匹配,即Host是IP对应的域名
如下示例502的case
$ curl 'http://某个测试IP/test_query?c=1'
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>openresty</center>
</body>
</html>
注 : 用curl -H设置IP对应的Host后就正常返回了
curl 'http://某个测试IP/test_query?c=1' -H'Host:具体的域名
参考文档
边栏推荐
- GDT,LDT,GDTR,LDTR
- What is behind the development of science and technology now is the advent of the era of the meta universe
- Wechat applet application development (I)
- GDAL image resampling
- Cluster clock synchronization configuration
- Bubble mart's market value evaporated by HK $21billion in seven days, which can't be sold in China, and its future at sea is uncertain
- @ResponseBody注解的总结
- Huawei cloud from entry to actual combat | cloud rapid site establishment service and enterprise host security service
- How many rows does PostgreSQL need to partition for each table?
- Aggregate payment meets the needs of various industries to access a variety of payments
猜你喜欢

Detailed explanation of kubernetes network plug-in - flannel chapter

Wechat applet experiment case: simple idiom dictionary

Visual studio 2019 installation and uninstallation problems

Analyze the exploration in high-quality steam Education

Kubesphere 3.3.0 offline installation tutorial

Preparation for Android development in big companies

Unity3d learning note 9 - loading textures

To clarify the tax arrears: there is no tax arrears, and will continue to operate in compliance, rooted in China

开源之夏专访|“00 后” PMC member 白泽平

Xrrunner, a domestic performance testing tool for palm smart, officially unveiled qecon
随机推荐
Properties of trees
Detailed explanation of kubernetes network plug-in - flannel chapter
暗黑王者|ZEGO 低照度图像增强技术解析
Press the switch for the minimum number of times to turn on all lights
Definition and basic terms of tree
(cvpr2020) reading of learning texture transformer network for image super resolution
Permanently solve Matplotlib Chinese garbled code
If the development of the metauniverse still follows the development logic of the Internet, and its end point also follows
01 create project warehouse
C language: Escape Character
Grafana visual configuration diagram histogram
Top101 [linked list] must be applied for interview
[golang from introduction to practice] stone scissors paper game
Source code analysis of ArrayList
Sudden! Britain accuses Huawei of major defects in its equipment (with report)
Internship in 2022
Huawei od maximum consumption JS
How to use ide tool hhdbcs to create a data table containing 1000 simulated data in Oracle database, and
What tools are available to connect and manage polardb for PostgreSQL databases?
Apipost signs up with Chinatelecom! Work together to accelerate the digital transformation of enterprises