Mercurial > hg > nginx-quic
annotate conf/nginx.conf @ 7514:319242d2ddc9
Upstream: background cache update before cache send (ticket #1782).
In case of filter finalization, essential request fields like r->uri,
r->args etc could be changed, which affected the cache update subrequest.
Also, after filter finalization r->cache could be set to NULL, leading to
null pointer dereference in ngx_http_upstream_cache_background_update().
The fix is to create background cache update subrequest before sending the
cached response.
Since initial introduction in 1aeaae6e9446 (1.11.10) background cache update
subrequest was created after sending the cached response because otherwise it
blocked the parent request output. In 9552758a786e (1.13.1) background
subrequests were introduced to eliminate the delay before sending the final
part of the cached response. This also made it possible to create the
background cache update subrequest before sending the response.
Note that creating the subrequest earlier does not change the fact that in case
of filter finalization the background cache update subrequest will likely not
have enough time to successfully update the cache entry. Filter finalization
leads to the main request termination as soon the current iteration of request
processing is complete.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 03 Jun 2019 20:33:26 +0300 |
parents | d22eb224aedf |
children |
rev | line source |
---|---|
450 | 1 |
455 | 2 #user nobody; |
573 | 3 worker_processes 1; |
450 | 4 |
5 #error_log logs/error.log; | |
577 | 6 #error_log logs/error.log notice; |
7 #error_log logs/error.log info; | |
8 | |
450 | 9 #pid logs/nginx.pid; |
10 | |
11 | |
12 events { | |
573 | 13 worker_connections 1024; |
450 | 14 } |
15 | |
16 | |
17 http { | |
1394 | 18 include mime.types; |
450 | 19 default_type application/octet-stream; |
20 | |
2286
d795199b41ad
add double quotes around $request
Igor Sysoev <igor@sysoev.ru>
parents:
1907
diff
changeset
|
21 #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
2684
c944cba169e3
update $status in log_format example
Igor Sysoev <igor@sysoev.ru>
parents:
2286
diff
changeset
|
22 # '$status $body_bytes_sent "$http_referer" ' |
657 | 23 # '"$http_user_agent" "$http_x_forwarded_for"'; |
577 | 24 |
25 #access_log logs/access.log main; | |
26 | |
493 | 27 sendfile on; |
577 | 28 #tcp_nopush on; |
493 | 29 |
523 | 30 #keepalive_timeout 0; |
645 | 31 keepalive_timeout 65; |
450 | 32 |
33 #gzip on; | |
34 | |
35 server { | |
577 | 36 listen 80; |
37 server_name localhost; | |
450 | 38 |
573 | 39 #charset koi8-r; |
450 | 40 |
577 | 41 #access_log logs/host.access.log main; |
450 | 42 |
43 location / { | |
44 root html; | |
45 index index.html index.htm; | |
46 } | |
47 | |
657 | 48 #error_page 404 /404.html; |
49 | |
50 # redirect server error pages to the static page /50x.html | |
51 # | |
52 error_page 500 502 503 504 /50x.html; | |
53 location = /50x.html { | |
54 root html; | |
55 } | |
56 | |
569 | 57 # proxy the PHP scripts to Apache listening on 127.0.0.1:80 |
58 # | |
59 #location ~ \.php$ { | |
60 # proxy_pass http://127.0.0.1; | |
61 #} | |
62 | |
577 | 63 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 |
64 # | |
65 #location ~ \.php$ { | |
1907
7d47e1681a62
add "root" to the fastcgi example to set correct included DOCUMENT_ROOT
Igor Sysoev <igor@sysoev.ru>
parents:
1394
diff
changeset
|
66 # root html; |
577 | 67 # fastcgi_pass 127.0.0.1:9000; |
68 # fastcgi_index index.php; | |
611 | 69 # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; |
1394 | 70 # include fastcgi_params; |
577 | 71 #} |
72 | |
645 | 73 # deny access to .htaccess files, if Apache's document root |
74 # concurs with nginx's one | |
481 | 75 # |
527 | 76 #location ~ /\.ht { |
481 | 77 # deny all; |
78 #} | |
450 | 79 } |
577 | 80 |
81 | |
82 # another virtual host using mix of IP-, name-, and port-based configuration | |
83 # | |
84 #server { | |
85 # listen 8000; | |
86 # listen somename:8080; | |
87 # server_name somename alias another.alias; | |
88 | |
89 # location / { | |
90 # root html; | |
91 # index index.html index.htm; | |
92 # } | |
93 #} | |
94 | |
95 | |
96 # HTTPS server | |
97 # | |
98 #server { | |
5319
50f531a55b73
Fixed misleading example SSL config.
Sergey Budnevitch <sb@waeme.net>
parents:
3938
diff
changeset
|
99 # listen 443 ssl; |
577 | 100 # server_name localhost; |
101 | |
102 # ssl_certificate cert.pem; | |
103 # ssl_certificate_key cert.key; | |
104 | |
5326 | 105 # ssl_session_cache shared:SSL:1m; |
577 | 106 # ssl_session_timeout 5m; |
107 | |
3938
1e90599af73b
use !aNULL to disable all anonymous cipher suites
Igor Sysoev <igor@sysoev.ru>
parents:
2684
diff
changeset
|
108 # ssl_ciphers HIGH:!aNULL:!MD5; |
5326 | 109 # ssl_prefer_server_ciphers on; |
577 | 110 |
111 # location / { | |
112 # root html; | |
113 # index index.html index.htm; | |
114 # } | |
115 #} | |
116 | |
450 | 117 } |