当 Apache Traffic Server 作为正向代理缓存运行时,如何让缓存检查器工作

当 Apache Traffic Server 作为正向代理缓存运行时,如何让缓存检查器工作

当尝试在 Apache Traffic Server (8.0.8) 上使用缓存检查器并配置为正向代理缓存时,似乎在关闭映射时触发递归(正向代理所需)。

-sh-4.2$ curl -v "localhost/myCI"
* About to connect() to localhost port 80 (#0)
*   Trying ::1...
* Connection refused
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /myCI HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost
> Accept: */*
>
< HTTP/1.1 400 Multi-Hop Cycle Detected
< Date: Tue, 28 Jul 2020 18:55:01 GMT
< Server: ATS/8.0.8
< Cache-Control: no-store
< Content-Type: text/html
< Content-Language: en
< Content-Length: 346
< Age: 2
< Connection: keep-alive
<
<HTML>
<HEAD>
<TITLE>Cycle Prohibited</TITLE>
</HEAD>

<BODY BGCOLOR="white" FGCOLOR="black">
<H1>Cycle Prohibited</H1>
<HR>

<FONT FACE="Helvetica,Arial"><B>
Description: Could not process your request for the document
because it would cause an HTTP proxy cycle.  Please check the URL and your
browser's proxy settings.
</B></FONT>
<HR>
</BODY>

我的配置:

-sh-4.2$ traffic_ctl config diff
proxy.config.url_remap.remap_required has changed
        Current Value   : 0
        Default Value   : 1
proxy.config.reverse_proxy.enabled has changed
        Current Value   : 0
        Default Value   : 1
proxy.config.http.server_ports has changed
        Current Value   : 80
        Default Value   : 8080 8080:ipv6
proxy.config.http.cache.ignore_server_no_cache has changed
        Current Value   : 1
        Default Value   : 0
proxy.config.http.cache.heuristic_min_lifetime has changed
        Current Value   : 604800
        Default Value   : 3600
proxy.config.http.cache.heuristic_max_lifetime has changed
        Current Value   : 2592000
        Default Value   : 86400
proxy.config.net.connections_throttle has changed
        Current Value   : 3000
        Default Value   : 30000
proxy.config.http_ui_enabled has changed
        Current Value   : 1
        Default Value   : 0
proxy.config.http.cache.required_headers has changed
        Current Value   : 0
        Default Value   : 2
proxy.config.admin.user_id has changed
        Current Value   : <snipped>
        Default Value   : nobody
proxy.config.http.cache.enable_default_vary_headers has changed
        Current Value   : 1
        Default Value   : 0

注意:这是在我将端口从 8080 更改为 80 之前发生的,我很确定它应该在配置为端口的任何内容上提供 myCI。

注2:traffic_ctl config diff提供所有非默认配置值。

注3:远程浏览器行为与本地主机 curl 行为一致。

答案1

问题是我需要在 URL 上添加一个结束斜杠,例如 /myCI/ 而不是 /myCI

相关内容