1

球童给了我这个错误:

运行:使用 caddyfile 调整配置:/etc/caddy/Caddyfile:21:无法识别的指令:uri

我的球童档案:

{
  email localemail@example.com
  acme_ca https://acme-v02.api.letsencrypt.org/directory
  #acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
}

https://www.example.com {
  file_server {
    root /var/www/html
  }
  try_files {path}.html {path}
  encode gzip zstd
  log
}

example.com, altexample.com, www.altexample.com {
  redir https://www.commerceowl.com{uri}
}

https://help.example.com {
  uri /en/* strip_prefix /en
  redir https://www.commerceowl.com/support{uri}
}

有什么问题uri /en/* strip_prefix /en

4

1 回答 1

1

第 2 版官方文档(https://caddyserver.com/docs/caddyfile/directives/uri)描述如下:

uri strip_prefix /en

于 2021-12-10T14:03:40.717 回答