Squid 配置指令 error_map

可用版本:   2.6  

此指令在 Squid 的 v8 版本中不可用。

此指令在 Squid 的 v7 版本中不可用。

此指令在 Squid 的 v6 版本中不可用。

此指令在 Squid 的 v5 版本中不可用。

对于 v5 之前的旧版本,请参阅以上链接页面。

配置详情

选项名称error_map
替代
要求
默认值none
建议配置

      
	Map errors to custom messages

	    error_map message_url http_status ...

	http_status ... is a list of HTTP status codes or Squid error
	messages.

	Use in accelerators to substitute the error messages returned
	by servers with other custom errors.

	    error_map http://your.server/error/404.shtml 404

	Requests for error messages is a GET request for the configured
	URL with the following special headers

	    X-Error-Status:	The received HTTP status code (i.e. 404)
	    X-Request-URI:	The requested URI where the error occurred

	In Addition the following headers are forwarded from the client
	request:

	    User-Agent, Cookie, X-Forwarded-For, Via, Authorization,
	    Accept, Referer

	And the following headers from the server reply:

	    Server, Via, Location, Content-Location

	The reply returned to the client will carry the original HTTP
	headers from the real error message, but with the reply body
	of the configured error message.


 

返回

 

简介

文档

支持

杂项