seafile13修改caddy.yml的端口为8000:80后,知识库不能使用

你的 SEAFILE_SERVER_HOSTNAME 环境变量的设置值是什么呢?

seahub_settings.py 中有没有手工设置 FILE_SERVER_ROOT 呢?(这个变量不应该手工设置)

SEAFILE_SERVER_HOSTNAME=seafile.xxxxxxxcom:8000

#FILE_SERVER_ROOT = ‘http://seafile:8000’ 这个变量之前设置了,或来已经注释掉,现在删除了

我发的就是完整路径,只修改了域名部分。

好的,麻烦你看一下 seahub_settings.py 中的配置项

是否包含 HTTP_SERVER_ROOT, 如果配置了需要删除一下

没有配置,seahub_settings.py只按文档配置了邮件的设置,还没有成功,阿里云的企业邮箱。内容如下

# -*- coding: utf-8 -*-
SECRET_KEY = "okl#(iqax7-qr_pb3rsag163-+q1sz6oc85)6*7=dd0z(4m89g"

TIME_ZONE = 'Etc/UTC'

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.xxxxxxx.cn'        # SMTP 服务器
EMAIL_HOST_USER = 'xxxxx@xxxxxx.cn'    # 用户名和域名
EMAIL_HOST_PASSWORD = 'xxxxxxx'       # 密码
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER


.env文件相关行

#################################
#      Startup parameters       #
#################################
SEAFILE_SERVER_HOSTNAME=seafile.xxxxxxxxx.com:8000
SEAFILE_SERVER_PROTOCOL=http
TIME_ZONE=Etc/UTC

############################################
# Additional configurations for extensions #
############################################

## SeaDoc service
ENABLE_SEADOC=true
SEADOC_SERVER_URL=http://seafile.xxxxxxxx.com:8000/sdoc-server

## Notification
ENABLE_NOTIFICATION_SERVER=true
NOTIFICATION_SERVER_URL=http://seafile.xxxxxxxxx.com:8000/notification
INNER_NOTIFICATION_SERVER_URL=http://notification-server:8083

caddy文件

services:

  caddy:
    image: ${SEAFILE_CADDY_IMAGE:-lucaslorentz/caddy-docker-proxy:2.9-alpine}
    restart: unless-stopped
    container_name: seafile-caddy
    ports:
      - 8000:8000
      - 8443:8443
    environment:
      - CADDY_INGRESS_NETWORKS=seafile-net
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ${SEAFILE_CADDY_VOLUME:-/opt/seafile-caddy}:/data/caddy
    networks:
      - seafile-net
        # !!! 新增:分配静态 IP 地址 !!!
        #ipv4_address: 172.20.0.2
    healthcheck:
      test: ["CMD-SHELL", "curl --fail http://localhost:2019/metrics || exit 1"]
      start_period: 20s
      interval: 20s
      timeout: 5s
      retries: 3

networks:
  seafile-net:
    name: seafile-net
    # !!! 新增:定义网络子网 !!!
    #ipam:
     # config:
        # 为 Docker Compose 网络定义固定的子网
        #- subnet: 172.20.0.0/24

seadoc文件

services:

  seadoc:
    image: ${SEADOC_IMAGE:-seafileltd/sdoc-server:2.0-latest}
    container_name: seadoc
    restart: unless-stopped
    volumes:
      - ${SEADOC_VOLUME:-/opt/seadoc-data/}:/shared
    ports:
      - "8000:80"
    environment:
      - DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
      - DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
      - DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
      - DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
      - DB_NAME=${SEADOC_MYSQL_DB_NAME:-seahub_db}
      - TIME_ZONE=${TIME_ZONE:-Etc/UTC}
      - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
      - NON_ROOT=${NON_ROOT:-false}
      #- SEAHUB_SERVICE_URL=http://seafile.xxxxxxx.com:8000
      - SEAHUB_SERVICE_URL=${SEAFILE_SERVICE_URL:-http://seafile}
      # extra_hosts:
      # 替换 172.19.0.3 为你实际获取到的 Caddy 容器的 IP
      #- "seafile.xxxxxxxx.com:172.20.0.2"
    labels:
      caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
      caddy.@ws.0_header: "Connection *Upgrade*"
      caddy.@ws.1_header: "Upgrade websocket"
      caddy.0_reverse_proxy: "@ws {{upstreams 80}}"
      caddy.1_handle_path: "/socket.io/*"
      caddy.1_handle_path.0_rewrite: "* /socket.io{uri}"
      caddy.1_handle_path.1_reverse_proxy: "{{upstreams 80}}"
      caddy.2_handle_path: "/sdoc-server/*"
      caddy.2_handle_path.0_rewrite: "* {uri}"
      caddy.2_handle_path.1_reverse_proxy: "{{upstreams 80}}"
    depends_on:
      db:
        condition: service_healthy
    networks:
      - seafile-net

seafile-server文件

  seafile:
    image: ${SEAFILE_IMAGE:-seafileltd/seafile-mc:13.0-latest}
    container_name: seafile
    restart: unless-stopped
    # ports:
    #   - "80:80"
    volumes:
      - ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared
environment:
      - SEAFILE_MYSQL_DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
      - SEAFILE_MYSQL_DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
      - SEAFILE_MYSQL_DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
      - SEAFILE_MYSQL_DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
      - INIT_SEAFILE_MYSQL_ROOT_PASSWORD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-}
      - SEAFILE_MYSQL_DB_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db}
      - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db}
      - SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db}
      - TIME_ZONE=${TIME_ZONE:-Etc/UTC}
      - INIT_SEAFILE_ADMIN_EMAIL=${INIT_SEAFILE_ADMIN_EMAIL:-me@example.com}
      - INIT_SEAFILE_ADMIN_PASSWORD=${INIT_SEAFILE_ADMIN_PASSWORD:-asecret}
      - SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
      - SEAFILE_SERVER_PROTOCOL=${SEAFILE_SERVER_PROTOCOL:-http}
      - SITE_ROOT=${SITE_ROOT:-/}
      - NON_ROOT=${NON_ROOT:-false}
      - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
      - SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false}
      - ENABLE_SEADOC=${ENABLE_SEADOC:-true}
      - SEADOC_SERVER_URL=${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}/sdoc-server
      - CACHE_PROVIDER=${CACHE_PROVIDER:-redis}
      - REDIS_HOST=${REDIS_HOST:-redis}
      - REDIS_PORT=${REDIS_PORT:-6379}
      - REDIS_PASSWORD=${REDIS_PASSWORD:-}
      - MEMCACHED_HOST=${MEMCACHED_HOST:-memcached}
      - MEMCACHED_PORT=${MEMCACHED_PORT:-11211}
      - ENABLE_NOTIFICATION_SERVER=${ENABLE_NOTIFICATION_SERVER:-false}
      - INNER_NOTIFICATION_SERVER_URL=${INNER_NOTIFICATION_SERVER_URL:-http://notification-server:8083}
      -  NOTIFICATION_SERVER_URL=${NOTIFICATION_SERVER_URL:-${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empt>
      - ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false}
      - SEAFILE_AI_SERVER_URL=${SEAFILE_AI_SERVER_URL:-http://seafile-ai:8888}
      - SEAFILE_AI_SECRET_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
      - MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000}

关闭ufw后一切正常了,seadoc工作正常,知识库可以新建页面,只是导入文件会提示错误,但实际又是导入成功的,sdoc可以打开编辑。
跟gemini对话得知ufw-docker插件,可以解决ufw和容器的交互问题,安装后加入规则

允许外部流量转发到 172.19.0.5 容器的 8082 端口
sudo ufw route allow proto tcp from any to 172.19.0.5 port 8082
sudo ufw route allow proto tcp from any to 172.19.0.5 port 8000

172.19.0.5是当时容器分配的地址,重启后失效,需要在配置中设置固定ip
但似乎seadoc功能又失效了,有待继续测试

已经确认是ufw的问题了,不知道官方有没有解决方案。
尝试修改/etc/ufw/after.rules


# rules.input-after
#
# Rules that should be run after the ufw command line added rules. Custom
# rules should be added to one of these chains:
# ufw-after-input
# ufw-after-output
# ufw-after-forward
#

# Don't delete these required lines, otherwise there will be errors
*filter
:ufw-after-input - [0:0]
:ufw-after-output - [0:0]
:ufw-after-forward - [0:0]
# End required lines

# -----------------------------------------------------
# START Docker-friendly Forwarding Rules (Non-Static IP Solution)
# -----------------------------------------------------

# 1. 定义 DOCKER-USER 链 (这是修复语法错误的关键一步)
:DOCKER-USER - [0:0]

# 2. 将 FORWARD 流量链接到 DOCKER-USER 链
# 插入到 FORWARD 链的开头,确保 Docker 流量在 UFW 规则之前处理。
-I FORWARD -j DOCKER-USER

# 3. 允许容器的出口 (Egress) 流量
# -i docker+ 匹配所有 Docker 接口,允许其向外转发,解决 Seadoc 出口问题。
-A FORWARD -i docker+ -j ACCEPT

# 4. 解决外部访问容器的问题 (入站 Ingress Forward)
# 允许外部流量通过宿主机端口转发到 Docker 容器。
# 注意:现在我们使用的 DOCKER-USER 链是正确定义的。
-A DOCKER-USER -p tcp -m tcp --dport 8000 -j ACCEPT
-A DOCKER-USER -p tcp -m tcp --dport 8443 -j ACCEPT
-A DOCKER-USER -p tcp -m tcp --dport 8082 -j ACCEPT
-A DOCKER-USER -p tcp -m tcp --dport 8083 -j ACCEPT

# 5. 确保非 Docker 流量跳过 DOCKER-USER 链,返回主 FORWARD 链
-A DOCKER-USER -j RETURN

# -----------------------------------------------------
# END Docker-friendly Forwarding Rules
# -----------------------------------------------------

# don't log noisy services by default
-A ufw-after-input -p udp --dport 137 -j ufw-skip-to-policy-input
-A ufw-after-input -p udp --dport 138 -j ufw-skip-to-policy-input
-A ufw-after-input -p tcp --dport 139 -j ufw-skip-to-policy-input
-A ufw-after-input -p tcp --dport 445 -j ufw-skip-to-policy-input
-A ufw-after-input -p udp --dport 67 -j ufw-skip-to-policy-input
-A ufw-after-input -p udp --dport 68 -j ufw-skip-to-policy-input

# don't log noisy broadcast
-A ufw-after-input -m addrtype --dst-type BROADCAST -j ufw-skip-to-policy-input

# don't delete the 'COMMIT' line or these rules won't be processed
COMMIT

docker logs seafile-caddy日志显示

afile@ecs-75a5:~$ docker logs seafile-caddy
{"level":"info","ts":1761278227.8312378,"logger":"docker-proxy","msg":"Running caddy proxy server"}
{"level":"info","ts":1761278227.8322191,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1761278227.832392,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1761278227.8324049,"logger":"docker-proxy","msg":"Running caddy proxy controller"}
{"level":"info","ts":1761278227.8328817,"logger":"docker-proxy","msg":"Start","CaddyfilePath":"","EnvFile":"","LabelPrefix":"caddy","PollingInterval":30,"ProxyServiceTasks":true,"ProcessCaddyfile":true,"ScanStoppedContainers":false,"IngressNetworks":"[seafile-net]","DockerSockets":[""],"DockerCertsPath":[""],"DockerAPIsVersion":[""]}
{"level":"info","ts":1761278227.8334064,"logger":"docker-proxy","msg":"Connecting to docker events","DockerSocket":""}
{"level":"info","ts":1761278227.8336122,"logger":"docker-proxy","msg":"IngressNetworksMap","ingres":"map[ddaf6952b93aa5913453e1f9c69a5a3633e8f6f0a9d1dcbb99420dc2eb37e5a8:true seafile-net:true]"}
{"level":"info","ts":1761278227.8400824,"logger":"docker-proxy","msg":"Swarm is available","new":false}
{"level":"info","ts":1761278227.8413112,"logger":"docker-proxy","msg":"New Caddyfile","caddyfile":"# Empty caddyfile"}
{"level":"warn","ts":1761278227.8414876,"logger":"docker-proxy","msg":"Caddyfile to json warning","warn":"[Caddyfile:1: Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies]"}
{"level":"info","ts":1761278227.841502,"logger":"docker-proxy","msg":"New Config JSON","json":"{}"}
{"level":"info","ts":1761278227.8415256,"logger":"docker-proxy","msg":"Sending configuration to","server":"localhost"}
{"level":"info","ts":1761278227.842143,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"48208","headers":{"Accept-Encoding":["gzip"],"Content-Length":["41"],"Content-Type":["application/json"],"User-Agent":["Go-http-client/1.1"]}}
{"level":"info","ts":1761278227.8421862,"msg":"config is unchanged"}
{"level":"info","ts":1761278227.842196,"logger":"admin.api","msg":"load complete"}
{"level":"info","ts":1761278227.8422909,"logger":"docker-proxy","msg":"Successfully configured","server":"localhost"}
{"level":"info","ts":1761278233.581091,"logger":"docker-proxy","msg":"New Caddyfile","caddyfile":"http://seafile.xxxxxxx.com:8000 {\n\t@ws {\n\t\theader Connection *Upgrade*\n\t\theader Upgrade websocket\n\t}\n\treverse_proxy @ws 172.19.0.6:80 172.19.0.9:8083\n\thandle_path /notification* {\n\t\trewrite * {uri}\n\t\treverse_proxy 172.19.0.9:8083\n\t}\n\thandle_path /socket.io/* {\n\t\trewrite * /socket.io{uri}\n\t\treverse_proxy 172.19.0.6:80\n\t}\n\thandle_path /sdoc-server/* {\n\t\trewrite * {uri}\n\t\treverse_proxy 172.19.0.6:80\n\t}\n\treverse_proxy 172.19.0.8:80\n}\n"}
{"level":"info","ts":1761278233.5818212,"logger":"docker-proxy","msg":"New Config JSON","json":"{\"apps\":{\"http\":{\"servers\":{\"srv0\":{\"listen\":[\":8000\"],\"routes\":[{\"match\":[{\"host\":[\"seafile.xxxxxxx.com\"]}],\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"group\":\"group3\",\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"handle\":[{\"handler\":\"rewrite\",\"strip_path_prefix\":\"/notification\"}]},{\"group\":\"group0\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"{http.request.uri}\"}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.9:8083\"}]}]}]}],\"match\":[{\"path\":[\"/notification*\"]}]},{\"group\":\"group3\",\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"handle\":[{\"handler\":\"rewrite\",\"strip_path_prefix\":\"/sdoc-server\"}]},{\"group\":\"group2\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"{http.request.uri}\"}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.6:80\"}]}]}]}],\"match\":[{\"path\":[\"/sdoc-server/*\"]}]},{\"group\":\"group3\",\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"handle\":[{\"handler\":\"rewrite\",\"strip_path_prefix\":\"/socket.io\"}]},{\"group\":\"group1\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"/socket.io{http.request.uri}\"}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.6:80\"}]}]}]}],\"match\":[{\"path\":[\"/socket.io/*\"]}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.6:80\"},{\"dial\":\"172.19.0.9:8083\"}]}],\"match\":[{\"header\":{\"Connection\":[\"*Upgrade*\"],\"Upgrade\":[\"websocket\"]}}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.8:80\"}]}]}]}],\"terminal\":true}],\"automatic_https\":{\"skip\":[\"seafile.xxxxxxx.com\"]}}}}}}"}
{"level":"info","ts":1761278233.581861,"logger":"docker-proxy","msg":"Sending configuration to","server":"localhost"}
{"level":"info","ts":1761278233.5821404,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"48208","headers":{"Accept-Encoding":["gzip"],"Content-Length":["1536"],"Content-Type":["application/json"],"User-Agent":["Go-http-client/1.1"]}}
{"level":"info","ts":1761278233.5829575,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1761278233.5832193,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000848c80"}
{"level":"warn","ts":1761278233.5835807,"logger":"http","msg":"HTTP/2 skipped because it requires TLS","network":"tcp","addr":":8000"}
{"level":"warn","ts":1761278233.5835915,"logger":"http","msg":"HTTP/3 skipped because it requires TLS","network":"tcp","addr":":8000"}
{"level":"info","ts":1761278233.583594,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1761278233.5836818,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1761278233.5836906,"logger":"admin.api","msg":"load complete"}
{"level":"info","ts":1761278233.5838168,"logger":"docker-proxy","msg":"Successfully configured","server":"localhost"}
{"level":"info","ts":1761278233.5848496,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1761278233.5891404,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"b34cde42-feef-4d4e-af0c-138494b7850d","try_again":1761364633.5891392,"try_again_in":86399.999999645}
{"level":"info","ts":1761278233.5891972,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1761278777.8275082,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
{"level":"warn","ts":1761278777.8275414,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
{"level":"info","ts":1761278777.8275676,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1761278777.8276942,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1761278777.8276997,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
{"level":"info","ts":1761278822.2119048,"logger":"docker-proxy","msg":"Running caddy proxy server"}
{"level":"info","ts":1761278822.2161102,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"]}
{"level":"info","ts":1761278822.2173753,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1761278822.2173896,"logger":"docker-proxy","msg":"Running caddy proxy controller"}
{"level":"info","ts":1761278822.235227,"logger":"docker-proxy","msg":"Start","CaddyfilePath":"","EnvFile":"","LabelPrefix":"caddy","PollingInterval":30,"ProxyServiceTasks":true,"ProcessCaddyfile":true,"ScanStoppedContainers":false,"IngressNetworks":"[seafile-net]","DockerSockets":[""],"DockerCertsPath":[""],"DockerAPIsVersion":[""]}
{"level":"info","ts":1761278822.2374759,"logger":"docker-proxy","msg":"IngressNetworksMap","ingres":"map[ddaf6952b93aa5913453e1f9c69a5a3633e8f6f0a9d1dcbb99420dc2eb37e5a8:true seafile-net:true]"}
{"level":"info","ts":1761278822.2376802,"logger":"docker-proxy","msg":"Connecting to docker events","DockerSocket":""}
{"level":"info","ts":1761278822.244921,"logger":"docker-proxy","msg":"Swarm is available","new":false}
{"level":"info","ts":1761278822.2489786,"logger":"docker-proxy","msg":"New Caddyfile","caddyfile":"http://seafile.xxxxxxx.com:8000 {\n\t@ws {\n\t\theader Connection *Upgrade*\n\t\theader Upgrade websocket\n\t}\n\treverse_proxy @ws 172.19.0.5:80 :8083\n\thandle_path /notification* {\n\t\trewrite * {uri}\n\t\treverse_proxy :8083\n\t}\n\thandle_path /socket.io/* {\n\t\trewrite * /socket.io{uri}\n\t\treverse_proxy 172.19.0.5:80\n\t}\n\thandle_path /sdoc-server/* {\n\t\trewrite * {uri}\n\t\treverse_proxy 172.19.0.5:80\n\t}\n\treverse_proxy 172.19.0.9:80\n}\n"}
{"level":"info","ts":1761278822.2497206,"logger":"docker-proxy","msg":"New Config JSON","json":"{\"apps\":{\"http\":{\"servers\":{\"srv0\":{\"listen\":[\":8000\"],\"routes\":[{\"match\":[{\"host\":[\"seafile.xxxxxxx.com\"]}],\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"group\":\"group3\",\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"handle\":[{\"handler\":\"rewrite\",\"strip_path_prefix\":\"/notification\"}]},{\"group\":\"group0\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"{http.request.uri}\"}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\":8083\"}]}]}]}],\"match\":[{\"path\":[\"/notification*\"]}]},{\"group\":\"group3\",\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"handle\":[{\"handler\":\"rewrite\",\"strip_path_prefix\":\"/sdoc-server\"}]},{\"group\":\"group2\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"{http.request.uri}\"}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.5:80\"}]}]}]}],\"match\":[{\"path\":[\"/sdoc-server/*\"]}]},{\"group\":\"group3\",\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"handle\":[{\"handler\":\"rewrite\",\"strip_path_prefix\":\"/socket.io\"}]},{\"group\":\"group1\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"/socket.io{http.request.uri}\"}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.5:80\"}]}]}]}],\"match\":[{\"path\":[\"/socket.io/*\"]}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.5:80\"},{\"dial\":\":8083\"}]}],\"match\":[{\"header\":{\"Connection\":[\"*Upgrade*\"],\"Upgrade\":[\"websocket\"]}}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.9:80\"}]}]}]}],\"terminal\":true}],\"automatic_https\":{\"skip\":[\"seafile.xxxxxxx.com\"]}}}}}}"}

测试失败