【问题标题】:traefik HTTP POST request net::ERR_CONNECTION_RESETtraefik HTTP POST 请求网络::ERR_CONNECTION_RESET
【发布时间】:2022-07-12 17:12:41
【问题描述】:

我正在尝试安装This docker image

它在 http 的端口 3000 和 https 的 3001 上运行。

我只需要在 LocalNetwork 上运行 HTTP 版本。

上传测试运行时,浏览器控制台出现网络错误。

version: \"3.3\"

services:

  traefik:
    image: \"traefik:v2.8\"
    container_name: \"traefik\"
    command:
      - \"--log.level=DEBUG\"
      - \"--api.insecure=true\"
      - \"--providers.docker=true\"
      - \"--providers.docker.exposedbydefault=false\"
      - \"--entrypoints.web.address=:80\"
    ports:
      - \"5000:80\"
      - \"5001:8080\"
     
    volumes:
      - \"/var/run/docker.sock:/var/run/docker.sock:ro\"

  openspeedtest:
    image: \"openspeedtest/latest\"
    container_name: \"speedtest-service\"
    labels:
      - \"traefik.enable=true\"
      - \"traefik.http.routers.openspeedtest.rule=Host(`unraid.vishnu.pro`)\"
      - \"traefik.http.routers.openspeedtest.entrypoints=web\"

    标签: traefik traefik-ingress traefik-authentication traefik-plugins


    【解决方案1】:

    我不知道为什么我需要添加

    "traefik.http.middlewares.limit.buffering.maxRequestBodyBytes

    现在它对我有用。

    mytraefik yml

    
    version: "3.9"
    services:
      traefik:
        image: traefik:v2.8.0
        container_name: traefik
        command:
          - --log.level=INFO
          - --api.insecure=true
          - --providers.docker=true
          - --providers.docker.exposedbydefault=false
          - --entrypoints.web.address=:80
          - --entrypoints.websecure.address=:443
        ports:
          - 5000:80
          - 5001:443
          - 8080:8080
        volumes:
          - /var/run/docker.sock:/var/run/docker.sock:ro
      openspeedtest:
        image: openspeedtest/latest
        container_name: speedtest-service
        labels:
          - "traefik.enable=true"
          - "traefik.http.routers.openspeedtest.rule=Host(`192.168.1.15`)"
          - "traefik.http.routers.openspeedtest.entrypoints=web"
          - "traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=10000000000"
          - "traefik.http.routers.openspeedtest.middlewares=limit"
          - "traefik.http.routers.openspeedtest-https.rule=Host(`192.168.1.15`)"
          - "traefik.http.routers.openspeedtest-https.entrypoints=websecure"
          # - "traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=10000000000"
          - "traefik.http.routers.openspeedtest-https.middlewares=limit"
          - "traefik.http.routers.openspeedtest-https.tls=true"
          - "traefik.http.routers.openspeedtest-https.tls.certresolver=leresolver"
    
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-09-07
      • 1970-01-01
      • 1970-01-01
      • 2017-12-26
      相关资源
      最近更新 更多