Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.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
使用Docker标签禁用单个服务/域的HTTPS_Docker_Traefik - Fatal编程技术网

使用Docker标签禁用单个服务/域的HTTPS

使用Docker标签禁用单个服务/域的HTTPS,docker,traefik,Docker,Traefik,我已经在Docker Swarm环境中运行了很长一段时间Traefik+Let's Encrypt设置,一切都很顺利,只启用了HTTPS,因为我强制重定向HTTP->HTTPS 我现在遇到的问题是,我有一个只需要HTTP的特定站点/服务,但到目前为止,我还没有弄清楚如何仅禁用此特定服务的HTTP->HTTPS重定向,因为我真的不希望对我的所有站点/服务禁用它 我当前的traefik.toml相当简单: defaultEntryPoints = ["https", "http"] [entryP

我已经在Docker Swarm环境中运行了很长一段时间Traefik+Let's Encrypt设置,一切都很顺利,只启用了HTTPS,因为我强制重定向HTTP->HTTPS


我现在遇到的问题是,我有一个只需要HTTP的特定站点/服务,但到目前为止,我还没有弄清楚如何仅禁用此特定服务的HTTP->HTTPS重定向,因为我真的不希望对我的所有站点/服务禁用它

我当前的
traefik.toml
相当简单:

defaultEntryPoints = ["https", "http"]

[entryPoints]
  [entryPoints.http]
  address = ":80"
  [entryPoints.http.redirect]
  entryPoint = "https"

  [entryPoints.https]
  address = ":443"
  [entryPoints.https.tls]

  ...
在容器本身中,我尝试设置标签,例如
traefik.fontend.entryPoints=http
,但这并没有产生任何影响,可能是因为当前存在重定向


所以我的问题是:如何禁用特定容器的重定向或HTTPS,最好只使用标签?

“我有一个特定的站点/服务,只需要HTTP”,您的意思是客户端必须使用HTTP连接,或者必须使用HTTP访问容器?@Siyu两者都有。同时支持HTTP和HTTPS很好,而且实际上是首选,但是如果我禁用了全局HTTP->HTTPS重定向,那么HTTP将成为所有站点的默认设置,这不是我想要的,即使它适用于此特定站点。不要认为你可以: