Mastering Nginx
Using the Mail Module [ 64 ] Summary In this chapter, we have seen how NGINX can be configured to proxy POP3, IMAP, and SMTP con ...
NGINX as a Reverse Proxy A reverse proxy is a web server that terminates connections with clients and makes new ones to upstream ...
NGINX as a Reverse Proxy [ 66 ] Introduction to reverse proxying NGINX can serve as a reverse proxy by terminating requests from ...
Chapter 4 [ 67 ] In both of these cases, the URI part of the proxy_pass directive is not relevant, so the configuration would be ...
NGINX as a Reverse Proxy [ 68 ] Directive Explanation proxy_http_version The HTTP protocol version used to communicate with upst ...
Chapter 4 [ 69 ] Directive Explanation proxy_send_timeout The length of time that needs to elapse between two successive write o ...
NGINX as a Reverse Proxy [ 70 ] proxy_connect_timeout 30; proxy_send_timeout 15; proxy_read_timeout 15; proxy_send_lowat 12000; ...
Chapter 4 [ 71 ] The proxy_read_timeout and proxy_send_timeout directives define how long NGINX will wait between successive op ...
NGINX as a Reverse Proxy [ 72 ] Legacy servers with cookies You may find yourself in a situation where you will need to place mu ...
Chapter 4 [ 73 ] The upstream module Closely paired with the proxy module is the upstream module. The upstream directive starts ...
NGINX as a Reverse Proxy [ 74 ] Keepalive connections The keepalive directive deserves special mention. NGINX will keep this num ...
Chapter 4 [ 75 ] upstream memcaches { server 10.0.100.10:11211; server 10.0.100.20:11211; keepalive 64; } If we were to switch l ...
NGINX as a Reverse Proxy [ 76 ] The third load-balancing algorithm supported by the default upstream module, least connections, ...
Chapter 4 [ 77 ] This is the most basic proxy configuration possible. NGINX will terminate all client connections, and then prox ...
NGINX as a Reverse Proxy [ 78 ] server { location / { proxy_pass http://app; } } Using this configuration, NGINX will pass conse ...
Chapter 4 [ 79 ] If a client should always get the same upstream server, to effect a poor-man's session- stickiness, the ip_hash ...
NGINX as a Reverse Proxy [ 80 ] location @appserver { proxy_pass http://127.0.0.1:8080; } } The memcached_pass directive uses th ...
Chapter 4 [ 81 ] uWSGI upstream servers The uWSGI protocol has been very popular with Python developers. NGINX provides support ...
NGINX as a Reverse Proxy [ 82 ] Here, we're trying to determine which upstream to pass the request to, based on the value of the ...
Chapter 4 [ 83 ] proxy_pass http://127.0.0.1:8080; } This configuration can be illustrated by the following diagram: Another exa ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf