Loading topic
server block, then picks a location block inside it. Most "my proxy sends traffic to the wrong place" problems come from misreading one of these two steps. This chapter covers both so you can predict which block handles a5 min readproxy_pass decides which path the backend receives. It covers the two forms of proxy_pass, how location prefixes interact with each form, the cases where Nginx cannot rewrite at all, and how to check the result.7 min readproxy_pass block. You should know what HTTP request headers are and how a TCP connection exposes a peer address.7 min readserver block that uses proxy_pass to reach one backend. It also assumes you know how to run nginx -t and reload the configuration. Here you replace the single backend address with a named group of servers. The next chapters build on that group with 5 min readupstream group, and how to choose among the available methods. It assumes you can already define an upstream block and point proxy_pass at it, as covered in the previous chapter. It also assumes you know what an HTTP session cookie is and w6 min readupstream block, point proxy_pass at it, and reload Nginx safely. It covers what Nginx does when a backend misbehaves, and how to tune that behavior.7 min readkeepalive directive changes that, and which settings you need for it to work. It assumes you can read an upstream block, you know what proxy_pass does, and you understand the HTTP/1.1 7 min readproxy_pass configuration, you know what an upstream group is, and you can read HTTP status codes. If7 min readserver and location block that uses proxy_pass. It also assumes you know what an upstream group is and how proxy_set_header works. If upstream groups are new to you, read the earlier chapters on them first.5 min readupstream group and reload Nginx safely. Here you will add a response cache in front of the backends, so repeated requests for the same content are answered from disk without contacting an application server.5 min readproxy_pass configuration, define an upstream group, and run nginx -t and reload. It also assumes you can read an HTTP status code. Here you will learn to find out why a proxied request failed, using the access log, the error log and a few shell comm5 min read