Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_core_module.xml @ 65:f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
- "client_max_body_size 0" disables request body size checking.
- Default is "large_client_header_buffers 8k", on all architectures.
- "limit_except" acceptable methods are listed.
- Default is "limit_rate 0", which disables rate limiting.
- Default is "limit_rate_after 0".
- Default is "optimize_server_names off".
- Default is "server_name_in_redirect off".
- Other non-essential changes.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Sun, 09 Oct 2011 14:43:46 +0000 |
parents | 12f1de4539b4 |
children | 9332d7a02822 |
comparison
equal
deleted
inserted
replaced
64:e81894f71d00 | 65:f122a777a6de |
---|---|
149 with the file | 149 with the file |
150 <dq><pathname>/data/w3/images/top.gif</pathname></dq>. | 150 <dq><pathname>/data/w3/images/top.gif</pathname></dq>. |
151 </para> | 151 </para> |
152 | 152 |
153 <para> | 153 <para> |
154 The <argument>path</argument> value can contain variables. | 154 The <argument>path</argument> value can contain variables |
155 except <var>$document_root</var> and <var>$realpath_root</var>. | |
155 </para> | 156 </para> |
156 | 157 |
157 <para> | 158 <para> |
158 If <code>alias</code> is used inside a location defined | 159 If <code>alias</code> is used inside a location defined |
159 with a regular expression then such regular expression should | 160 with a regular expression then such regular expression should |
249 <context>location</context> | 250 <context>location</context> |
250 | 251 |
251 <para> | 252 <para> |
252 Sets buffer size for reading client request body. | 253 Sets buffer size for reading client request body. |
253 In case request body is larger than the buffer, | 254 In case request body is larger than the buffer, |
254 the whole body or only its part is written to a temporary file. | 255 the whole body or only its part is written to a |
255 <!-- ссылку на соотв. директивы про временные файлы? --> | 256 <link id="client_body_temp_path">temporary file</link>. |
256 By default, buffer size is equal to two memory pages. | 257 By default, buffer size is equal to two memory pages. |
257 This is 8K on x86, other 32-bit platforms, and x86-64. | 258 This is 8K on x86, other 32-bit platforms, and x86-64. |
258 It is usually 16K on other 64-bit platforms. | 259 It is usually 16K on other 64-bit platforms. |
259 </para> | 260 </para> |
260 | 261 |
290 </directive> | 291 </directive> |
291 | 292 |
292 | 293 |
293 <directive name="client_body_timeout"> | 294 <directive name="client_body_timeout"> |
294 <syntax>client_body_timeout <argument>time</argument></syntax> | 295 <syntax>client_body_timeout <argument>time</argument></syntax> |
295 <default>client_body_timeout 60</default> | 296 <default>client_body_timeout 60s</default> |
296 <context>http</context> | 297 <context>http</context> |
297 <context>server</context> | 298 <context>server</context> |
298 <context>location</context> | 299 <context>location</context> |
299 | 300 |
300 <para> | 301 <para> |
330 </directive> | 331 </directive> |
331 | 332 |
332 | 333 |
333 <directive name="client_header_timeout"> | 334 <directive name="client_header_timeout"> |
334 <syntax>client_header_timeout <argument>time</argument></syntax> | 335 <syntax>client_header_timeout <argument>time</argument></syntax> |
335 <default>client_header_timeout 60</default> | 336 <default>client_header_timeout 60s</default> |
336 <context>http</context> | 337 <context>http</context> |
337 <context>server</context> | 338 <context>server</context> |
338 | 339 |
339 <para> | 340 <para> |
340 Defines a timeout for reading client request header. | 341 Defines a timeout for reading client request header. |
363 <http-status code="413" text="Request Entity Too Large"/> | 364 <http-status code="413" text="Request Entity Too Large"/> |
364 is returned. | 365 is returned. |
365 Please be aware that | 366 Please be aware that |
366 <link doc="/web/upload.xml">browsers cannot correctly display | 367 <link doc="/web/upload.xml">browsers cannot correctly display |
367 this error</link>. | 368 this error</link>. |
369 Setting <argument>size</argument> to 0 disables client | |
370 request body size checking. | |
368 </para> | 371 </para> |
369 | 372 |
370 </directive> | 373 </directive> |
371 | 374 |
372 | 375 |
377 <context>server</context> | 380 <context>server</context> |
378 <context>location</context> | 381 <context>location</context> |
379 | 382 |
380 <para> | 383 <para> |
381 Defines a default MIME-type of a response. | 384 Defines a default MIME-type of a response. |
385 See also the <link id="types">types</link> directive. | |
382 </para> | 386 </para> |
383 | 387 |
384 </directive> | 388 </directive> |
385 | 389 |
386 | 390 |
591 <context>location</context> | 595 <context>location</context> |
592 | 596 |
593 <para> | 597 <para> |
594 Sets the maximum number of requests that can be | 598 Sets the maximum number of requests that can be |
595 made through one keep-alive connection. | 599 made through one keep-alive connection. |
600 After this many requests are made, the connection is closed. | |
596 </para> | 601 </para> |
597 | 602 |
598 </directive> | 603 </directive> |
599 | 604 |
600 | 605 |
601 <directive name="keepalive_timeout"> | 606 <directive name="keepalive_timeout"> |
602 <syntax>keepalive_timeout | 607 <syntax>keepalive_timeout |
603 <argument>time</argument> | 608 <argument>timeout</argument> |
604 [<argument>time</argument>] | 609 [<argument>header_timeout</argument>] |
605 </syntax> | 610 </syntax> |
606 <default>keepalive_timeout 75</default> | 611 <default>keepalive_timeout 75s</default> |
607 <context>http</context> | 612 <context>http</context> |
608 <context>server</context> | 613 <context>server</context> |
609 <context>location</context> | 614 <context>location</context> |
610 | 615 |
611 <para> | 616 <para> |
627 </directive> | 632 </directive> |
628 | 633 |
629 | 634 |
630 <directive name="large_client_header_buffers"> | 635 <directive name="large_client_header_buffers"> |
631 <syntax>large_client_header_buffers <argument>number size</argument></syntax> | 636 <syntax>large_client_header_buffers <argument>number size</argument></syntax> |
632 <default>large_client_header_buffers 4 4k/8k</default> | 637 <default>large_client_header_buffers 4 8k</default> |
633 <context>http</context> | 638 <context>http</context> |
634 <context>server</context> | 639 <context>server</context> |
635 | 640 |
636 <para> | 641 <para> |
637 Sets the maximum <argument>number</argument> and <argument>size</argument> of | 642 Sets the maximum <argument>number</argument> and <argument>size</argument> of |
642 A request header field cannot exceed the size of one buffer as well, or the | 647 A request header field cannot exceed the size of one buffer as well, or the |
643 client error | 648 client error |
644 <http-status code="400" text="Bad Request"/> | 649 <http-status code="400" text="Bad Request"/> |
645 is returned. | 650 is returned. |
646 Buffers are allocated only on demand. | 651 Buffers are allocated only on demand. |
647 By default, the buffer size is equal to one memory page size. | 652 By default, the buffer size is equal to 8K bytes. |
648 It is either 4K or 8K, platform dependent. | |
649 If after the end of request processing a connection is transitioned | 653 If after the end of request processing a connection is transitioned |
650 into the keep-alive state, these buffers are freed. | 654 into the keep-alive state, these buffers are freed. |
651 </para> | 655 </para> |
652 | 656 |
653 </directive> | 657 </directive> |
658 <default/> | 662 <default/> |
659 <context>location</context> | 663 <context>location</context> |
660 | 664 |
661 <para> | 665 <para> |
662 Limits allowed HTTP methods inside a location. | 666 Limits allowed HTTP methods inside a location. |
663 The GET method also implies the HEAD method. | 667 The <argument>method</argument> argument can be one of the following: |
668 <value>GET</value>, | |
669 <value>HEAD</value>, | |
670 <value>POST</value>, | |
671 <value>PUT</value>, | |
672 <value>DELETE</value>, | |
673 <value>MKCOL</value>, | |
674 <value>COPY</value>, | |
675 <value>MOVE</value>, | |
676 <value>OPTIONS</value>, | |
677 <value>PROPFIND</value>, | |
678 <value>PROPPATCH</value>, | |
679 <value>LOCK</value>, | |
680 <value>UNLOCK</value>, | |
681 or | |
682 <value>PATCH</value>. | |
683 Allowing the <value>GET</value> method also allows the | |
684 <value>HEAD</value> method. | |
664 Access to other methods can be limited using the | 685 Access to other methods can be limited using the |
665 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link> | 686 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link> |
666 and | 687 and |
667 <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link> | 688 <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link> |
668 modules directives: | 689 modules directives: |
679 </directive> | 700 </directive> |
680 | 701 |
681 | 702 |
682 <directive name="limit_rate"> | 703 <directive name="limit_rate"> |
683 <syntax>limit_rate <argument>rate</argument></syntax> | 704 <syntax>limit_rate <argument>rate</argument></syntax> |
684 <default/> | 705 <default>limit_rate 0</default> |
685 <context>http</context> | 706 <context>http</context> |
686 <context>server</context> | 707 <context>server</context> |
687 <context>location</context> | 708 <context>location</context> |
688 <context>if in location</context> | 709 <context>if in location</context> |
689 | 710 |
690 <para> | 711 <para> |
691 Rate limits the transmission of a response to a client. | 712 Rate limits the transmission of a response to a client. |
692 The <argument>rate</argument> is specified in bytes per second. | 713 The <argument>rate</argument> is specified in bytes per second. |
714 Value 0 (the default) disables rate limiting. | |
693 <!-- | 715 <!-- |
694 The smaller the rate, the more accurate will be the limitation. | 716 The smaller the rate, the more accurate will be the limitation. |
695 --> | 717 --> |
696 The limit is per connection, so if a single client opens 2 connections, | 718 The limit is per connection, so if a single client opens 2 connections, |
697 an overall rate will be 2x more than specified. | 719 an overall rate will be 2x more than specified by this directive. |
698 </para> | 720 </para> |
699 | 721 |
700 <para> | 722 <para> |
701 This directive is not applicable if one wants to rate limit | 723 This directive is not applicable if one wants to rate limit |
702 a group of clients on the | 724 a group of clients on the |
720 </directive> | 742 </directive> |
721 | 743 |
722 | 744 |
723 <directive name="limit_rate_after" appeared-in="0.8.0"> | 745 <directive name="limit_rate_after" appeared-in="0.8.0"> |
724 <syntax>limit_rate_after <argument>size</argument></syntax> | 746 <syntax>limit_rate_after <argument>size</argument></syntax> |
725 <default/> | 747 <default>limit_rate_after 0</default> |
726 <context>http</context> | 748 <context>http</context> |
727 <context>server</context> | 749 <context>server</context> |
728 <context>location</context> | 750 <context>location</context> |
729 <context>if in location</context> | 751 <context>if in location</context> |
730 | 752 |
933 <directive name="location"> | 955 <directive name="location"> |
934 <syntax>location [ | 956 <syntax>location [ |
935 <value>=</value> | | 957 <value>=</value> | |
936 <value>~</value> | | 958 <value>~</value> | |
937 <value>~*</value> | | 959 <value>~*</value> | |
938 <value>^~</value> | | 960 <value>^~</value> |
939 <value>@</value> | |
940 ] <argument>uri</argument> | 961 ] <argument>uri</argument> |
941 { ... }</syntax> | 962 { ... }</syntax> |
963 <syntax>location <value>@</value><argument>name</argument> { ... }</syntax> | |
942 <default/> | 964 <default/> |
943 <context>server</context> | 965 <context>server</context> |
944 <!-- | 966 <!-- |
945 <context>location</context> | 967 <context>location</context> |
946 --> | 968 --> |
1289 When | 1311 When |
1290 <link id="open_file_cache_events">open_file_cache_events</link> | 1312 <link id="open_file_cache_events">open_file_cache_events</link> |
1291 is enabled, open file descriptors | 1313 is enabled, open file descriptors |
1292 are checked only once, and then updated right after they get changed. | 1314 are checked only once, and then updated right after they get changed. |
1293 --> | 1315 --> |
1294 | |
1295 </para> | 1316 </para> |
1296 | 1317 |
1297 </directive> | 1318 </directive> |
1298 | 1319 |
1299 | 1320 |
1300 <directive name="optimize_server_names"> | 1321 <directive name="optimize_server_names"> |
1301 <syntax>optimize_server_names <value>on</value> | <value>off</value></syntax> | 1322 <syntax>optimize_server_names <value>on</value> | <value>off</value></syntax> |
1302 <default>optimize_server_names on</default> | 1323 <default>optimize_server_names off</default> |
1303 <context>http</context> | 1324 <context>http</context> |
1304 <context>server</context> | 1325 <context>server</context> |
1305 | 1326 |
1306 <para> | 1327 <para> |
1307 This directive is obsolete. | 1328 This directive is obsolete. |
1695 </directive> | 1716 </directive> |
1696 | 1717 |
1697 | 1718 |
1698 <directive name="server_name_in_redirect"> | 1719 <directive name="server_name_in_redirect"> |
1699 <syntax>server_name_in_redirect <value>on</value> | <value>off</value></syntax> | 1720 <syntax>server_name_in_redirect <value>on</value> | <value>off</value></syntax> |
1700 <default>server_name_in_redirect on</default> | 1721 <default>server_name_in_redirect off</default> |
1701 <context>http</context> | 1722 <context>http</context> |
1702 <context>server</context> | 1723 <context>server</context> |
1703 <context>location</context> | 1724 <context>location</context> |
1704 | 1725 |
1705 <para> | 1726 <para> |