Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Http 云运行和负载均衡器_Http_Google Cloud Platform_Https_Google Cloud Run_Gcp Load Balancer - Fatal编程技术网

Http 云运行和负载均衡器

Http 云运行和负载均衡器,http,google-cloud-platform,https,google-cloud-run,gcp-load-balancer,Http,Google Cloud Platform,Https,Google Cloud Run,Gcp Load Balancer,我当前的设置 GLB--->云运行 http--->https 我已将GLB设置为重定向http-->https 我相应地采取了以下步骤: 第一步example.com或http://example.com返回404错误且无重定向 第二步https://example.com它按预期工作 第三步。再次尝试example.com,它会工作并重定向到https 我想知道为什么步骤1最初返回一个404错误,但在使用https://example.com 是因为云运行冷启动还是因为GLB配置 更新-我

我当前的设置

GLB--->云运行

http--->https

我已将GLB设置为重定向
http-->https

我相应地采取了以下步骤:

第一步
example.com
http://example.com
返回
404错误
且无重定向

第二步<代码>https://example.com它按预期工作

第三步。再次尝试
example.com
,它会工作并重定向到
https

我想知道为什么步骤1最初返回一个
404错误
,但在使用
https://example.com

是因为云运行冷启动还是因为GLB配置


更新-我的GLB配置:
1后端服务,后端类型
NEG
,协议
http
,端口
80
,超时
30s


前端配置是协议
https
,端口
443
SSL
。谢谢。

1)您是如何配置HTTP->https重定向的?2) 你有HTTP前端吗?3) 显示前端和后端的配置。你能重现这种情况吗?如果您配置HTTP->HTTPS重定向,它可能需要时间才能传播到分布式负载平衡器,这可能是原因。@JohnHanley GLB configuration 1后端服务,后端类型
NEG
,协议
HTTP
,超时
30s
ThanksThanks@guillaumeblaquiere这已经有几天了,所以我假设它已经在整个系统中传播了。1)我看不到您是如何在负载平衡器上重定向HTTP->HTTPS,或者甚至接受HTTP,因为这需要前端。2) 云运行的后端协议应该是HTTPS/443,而不是HTTP/80。