Mercurial > hg > nginx-quic
annotate conf/nginx.conf @ 8305:3e83336cda5b
Reuse of connections in lingering close.
This is particularly important in HTTP/2, where keepalive connections
are closed with lingering. Before the patch, reusing a keepalive HTTP/2
connection resulted in the connection waiting for lingering close to
remain in the reusable connections queue, preventing ngx_drain_connections()
from closing additional connections.
The patch fixes it by marking the connection reusable again, and so
moving it in the reusable connections queue. Further, it makes actually
possible to reuse such connections if needed.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 11 Feb 2021 21:52:09 +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 } |