Determines in which cases a stale cached response can be used when an error occurs during communication with the proxied server.
8)proxy_cache_methods GET | HEAD | POST ...;
针对方法做代理
If the client request method is listed in this directive then the response will be cached. “GET” and “HEAD” methods are always added to the list, though it is recommended to specify them explicitly.
9)proxy_hide_header field;
请求或响应中可以隐藏后端服务器报文内容
By default, nginx does not pass the header fields “Date”, “Server”, “X-Pad”, and “X-Accel-...” from the response of a proxied server to a client. The proxy_hide_header directive sets additional fields that will not be passed.
例:
location / {
proxy_hide_header Server;
}
10)proxy_connect_timeout time;
nginx代理服务器等待后端服务器响应时长;
Defines a timeout for establishing a connection with a proxied server. It should be noted that this timeout cannot usually exceed 75 seconds.