comparison xml/en/docs/http/ngx_http_core_module.xml @ 768:f63b7fa3bf17

Added "id" attributes to http core module variables.
author Vladimir Homutov <vl@nginx.com>
date Mon, 19 Nov 2012 14:44:56 +0000
parents 1bb8b733416a
children d71e56d56ada
comparison
equal deleted inserted replaced
767:1bb8b733416a 768:f63b7fa3bf17
2686 fields, such as <var>$http_user_agent</var>, <var>$http_cookie</var>, 2686 fields, such as <var>$http_user_agent</var>, <var>$http_cookie</var>,
2687 and so on. 2687 and so on.
2688 It also supports other variables: 2688 It also supports other variables:
2689 <list type="tag"> 2689 <list type="tag">
2690 2690
2691 <tag-name><var>$arg_</var><value>name</value></tag-name> 2691 <tag-name id="var_arg_"><var>$arg_</var><value>name</value></tag-name>
2692 <tag-desc> 2692 <tag-desc>
2693 argument <value>name</value> in the request line 2693 argument <value>name</value> in the request line
2694 </tag-desc> 2694 </tag-desc>
2695 2695
2696 <tag-name><var>$args</var></tag-name> 2696 <tag-name id="var_args"><var>$args</var></tag-name>
2697 <tag-desc> 2697 <tag-desc>
2698 arguments in the request line 2698 arguments in the request line
2699 </tag-desc> 2699 </tag-desc>
2700 2700
2701 <tag-name><var>$binary_remote_addr</var></tag-name> 2701 <tag-name id="var_binary_remote_addr"><var>$binary_remote_addr</var></tag-name>
2702 <tag-desc> 2702 <tag-desc>
2703 client address in a binary form, value’s length is always 4 bytes 2703 client address in a binary form, value’s length is always 4 bytes
2704 </tag-desc> 2704 </tag-desc>
2705 2705
2706 <tag-name><var>$body_bytes_sent</var></tag-name> 2706 <tag-name id="var_body_bytes_sent"><var>$body_bytes_sent</var></tag-name>
2707 <tag-desc> 2707 <tag-desc>
2708 number of bytes sent to a client, not counting the response header 2708 number of bytes sent to a client, not counting the response header
2709 </tag-desc> 2709 </tag-desc>
2710 2710
2711 <tag-name><var>$content_length</var></tag-name> 2711 <tag-name id="var_content_length"><var>$content_length</var></tag-name>
2712 <tag-desc> 2712 <tag-desc>
2713 <header>Content-Length</header> request header field 2713 <header>Content-Length</header> request header field
2714 </tag-desc> 2714 </tag-desc>
2715 2715
2716 <tag-name><var>$content_type</var></tag-name> 2716 <tag-name id="var_content_type"><var>$content_type</var></tag-name>
2717 <tag-desc> 2717 <tag-desc>
2718 <header>Content-Type</header> request header field 2718 <header>Content-Type</header> request header field
2719 </tag-desc> 2719 </tag-desc>
2720 2720
2721 <tag-name><var>$cookie_</var><value>name</value></tag-name> 2721 <tag-name id="var_cookie_"><var>$cookie_</var><value>name</value></tag-name>
2722 <tag-desc> 2722 <tag-desc>
2723 the <value>name</value> cookie 2723 the <value>name</value> cookie
2724 </tag-desc> 2724 </tag-desc>
2725 2725
2726 <tag-name><var>$document_root</var></tag-name> 2726 <tag-name id="var_document_root"><var>$document_root</var></tag-name>
2727 <tag-desc> 2727 <tag-desc>
2728 <link id="root"/> or <link id="alias"/> directive’s value 2728 <link id="root"/> or <link id="alias"/> directive’s value
2729 for the current request 2729 for the current request
2730 </tag-desc> 2730 </tag-desc>
2731 2731
2732 <tag-name><var>$document_uri</var></tag-name> 2732 <tag-name id="var_document_uri"><var>$document_uri</var></tag-name>
2733 <tag-desc> 2733 <tag-desc>
2734 same as <var>$uri</var> 2734 same as <var>$uri</var>
2735 </tag-desc> 2735 </tag-desc>
2736 2736
2737 <tag-name><var>$host</var></tag-name> 2737 <tag-name id="var_host"><var>$host</var></tag-name>
2738 <tag-desc> 2738 <tag-desc>
2739 <header>Host</header> request header field, 2739 <header>Host</header> request header field,
2740 or the server name matching a request if this field is not present 2740 or the server name matching a request if this field is not present
2741 </tag-desc> 2741 </tag-desc>
2742 2742
2743 <tag-name><var>$hostname</var></tag-name> 2743 <tag-name id="var_hostname"><var>$hostname</var></tag-name>
2744 <tag-desc> 2744 <tag-desc>
2745 host name 2745 host name
2746 </tag-desc> 2746 </tag-desc>
2747 2747
2748 <tag-name><var>$http_</var><value>name</value></tag-name> 2748 <tag-name id="var_http_"><var>$http_</var><value>name</value></tag-name>
2749 <tag-desc> 2749 <tag-desc>
2750 arbitrary request header field; 2750 arbitrary request header field;
2751 the last part of a variable name is the field name converted 2751 the last part of a variable name is the field name converted
2752 to lower case with dashes replaced by underscores 2752 to lower case with dashes replaced by underscores
2753 </tag-desc> 2753 </tag-desc>
2754 2754
2755 <tag-name><var>$https</var></tag-name> 2755 <tag-name id="var_https"><var>$https</var></tag-name>
2756 <tag-desc> 2756 <tag-desc>
2757 “<literal>on</literal>” 2757 “<literal>on</literal>”
2758 if connection operates in SSL mode, 2758 if connection operates in SSL mode,
2759 or an empty string otherwise 2759 or an empty string otherwise
2760 </tag-desc> 2760 </tag-desc>
2761 2761
2762 <tag-name><var>$is_args</var></tag-name> 2762 <tag-name id="var_is_args"><var>$is_args</var></tag-name>
2763 <tag-desc> 2763 <tag-desc>
2764 “<literal>?</literal>” if a request line has arguments, 2764 “<literal>?</literal>” if a request line has arguments,
2765 or an empty string otherwise 2765 or an empty string otherwise
2766 </tag-desc> 2766 </tag-desc>
2767 2767
2768 <tag-name><var>$limit_rate</var></tag-name> 2768 <tag-name id="var_limit_rate"><var>$limit_rate</var></tag-name>
2769 <tag-desc> 2769 <tag-desc>
2770 setting this variable allows for response rate limiting; 2770 setting this variable allows for response rate limiting;
2771 see <link id="limit_rate"/> 2771 see <link id="limit_rate"/>
2772 </tag-desc> 2772 </tag-desc>
2773 2773
2774 <tag-name><var>$nginx_version</var></tag-name> 2774 <tag-name id="var_nginx_version"><var>$nginx_version</var></tag-name>
2775 <tag-desc> 2775 <tag-desc>
2776 nginx version 2776 nginx version
2777 </tag-desc> 2777 </tag-desc>
2778 2778
2779 <tag-name><var>$pid</var></tag-name> 2779 <tag-name id="var_pid"><var>$pid</var></tag-name>
2780 <tag-desc> 2780 <tag-desc>
2781 PID of the worker process 2781 PID of the worker process
2782 </tag-desc> 2782 </tag-desc>
2783 2783
2784 <tag-name><var>$query_string</var></tag-name> 2784 <tag-name id="var_query_string"><var>$query_string</var></tag-name>
2785 <tag-desc> 2785 <tag-desc>
2786 same as <var>$args</var> 2786 same as <var>$args</var>
2787 </tag-desc> 2787 </tag-desc>
2788 2788
2789 <tag-name><var>$realpath_root</var></tag-name> 2789 <tag-name id="var_realpath_root"><var>$realpath_root</var></tag-name>
2790 <tag-desc> 2790 <tag-desc>
2791 an absolute pathname corresponding to the 2791 an absolute pathname corresponding to the
2792 <link id="root"/> or <link id="alias"/> directive’s value 2792 <link id="root"/> or <link id="alias"/> directive’s value
2793 for the current request, 2793 for the current request,
2794 with all symbolic links resolved to real paths 2794 with all symbolic links resolved to real paths
2795 </tag-desc> 2795 </tag-desc>
2796 2796
2797 <tag-name><var>$remote_addr</var></tag-name> 2797 <tag-name id="var_remote_addr"><var>$remote_addr</var></tag-name>
2798 <tag-desc> 2798 <tag-desc>
2799 client address 2799 client address
2800 </tag-desc> 2800 </tag-desc>
2801 2801
2802 <tag-name><var>$remote_port</var></tag-name> 2802 <tag-name id="var_remote_port"><var>$remote_port</var></tag-name>
2803 <tag-desc> 2803 <tag-desc>
2804 client port 2804 client port
2805 </tag-desc> 2805 </tag-desc>
2806 2806
2807 <tag-name><var>$remote_user</var></tag-name> 2807 <tag-name id="var_remote_user"><var>$remote_user</var></tag-name>
2808 <tag-desc> 2808 <tag-desc>
2809 user name supplied with the Basic authentication 2809 user name supplied with the Basic authentication
2810 </tag-desc> 2810 </tag-desc>
2811 2811
2812 <tag-name><var>$request</var></tag-name> 2812 <tag-name id="var_request"><var>$request</var></tag-name>
2813 <tag-desc> 2813 <tag-desc>
2814 full original request line 2814 full original request line
2815 </tag-desc> 2815 </tag-desc>
2816 2816
2817 <tag-name><var>$request_body</var></tag-name> 2817 <tag-name id="var_request_body"><var>$request_body</var></tag-name>
2818 <tag-desc> 2818 <tag-desc>
2819 request body 2819 request body
2820 <para> 2820 <para>
2821 The variable’s value is made available in locations 2821 The variable’s value is made available in locations
2822 processed by the 2822 processed by the
2825 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/> 2825 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>
2826 directives. 2826 directives.
2827 </para> 2827 </para>
2828 </tag-desc> 2828 </tag-desc>
2829 2829
2830 <tag-name><var>$request_body_file</var></tag-name> 2830 <tag-name id="var_request_body_file"><var>$request_body_file</var></tag-name>
2831 <tag-desc> 2831 <tag-desc>
2832 name of a temporary file with the request body 2832 name of a temporary file with the request body
2833 <para> 2833 <para>
2834 At the end of processing, the file needs to be removed. 2834 At the end of processing, the file needs to be removed.
2835 To always write a request body to a file, 2835 To always write a request body to a file,
2844 fastcgi_pass_request_body off</link> 2844 fastcgi_pass_request_body off</link>
2845 directives, respectively. 2845 directives, respectively.
2846 </para> 2846 </para>
2847 </tag-desc> 2847 </tag-desc>
2848 2848
2849 <tag-name><var>$request_completion</var></tag-name> 2849 <tag-name id="var_request_completion"><var>$request_completion</var></tag-name>
2850 <tag-desc> 2850 <tag-desc>
2851 “<literal>OK</literal>” if a request has completed, 2851 “<literal>OK</literal>” if a request has completed,
2852 or an empty string otherwise 2852 or an empty string otherwise
2853 </tag-desc> 2853 </tag-desc>
2854 2854
2855 <tag-name><var>$request_filename</var></tag-name> 2855 <tag-name id="var_request_filename"><var>$request_filename</var></tag-name>
2856 <tag-desc> 2856 <tag-desc>
2857 file path for the current request, based on the 2857 file path for the current request, based on the
2858 <link id="root"/> or <link id="alias"/> 2858 <link id="root"/> or <link id="alias"/>
2859 directives, and the request URI 2859 directives, and the request URI
2860 </tag-desc> 2860 </tag-desc>
2861 2861
2862 <tag-name><var>$request_method</var></tag-name> 2862 <tag-name id="var_request_method"><var>$request_method</var></tag-name>
2863 <tag-desc> 2863 <tag-desc>
2864 request method, usually 2864 request method, usually
2865 “<literal>GET</literal>” or “<literal>POST</literal>” 2865 “<literal>GET</literal>” or “<literal>POST</literal>”
2866 </tag-desc> 2866 </tag-desc>
2867 2867
2868 <tag-name><var>$request_uri</var></tag-name> 2868 <tag-name id="var_request_uri"><var>$request_uri</var></tag-name>
2869 <tag-desc> 2869 <tag-desc>
2870 full original request URI (with arguments) 2870 full original request URI (with arguments)
2871 </tag-desc> 2871 </tag-desc>
2872 2872
2873 <tag-name><var>$scheme</var></tag-name> 2873 <tag-name id="var_scheme"><var>$scheme</var></tag-name>
2874 <tag-desc> 2874 <tag-desc>
2875 request scheme, “<literal>http</literal>” or “<literal>https</literal>” 2875 request scheme, “<literal>http</literal>” or “<literal>https</literal>”
2876 </tag-desc> 2876 </tag-desc>
2877 2877
2878 <tag-name><var>$sent_http_</var><value>name</value></tag-name> 2878 <tag-name id="var_sent_http_"><var>$sent_http_</var><value>name</value></tag-name>
2879 <tag-desc> 2879 <tag-desc>
2880 arbitrary response header field; 2880 arbitrary response header field;
2881 the last part of a variable name is the field name converted 2881 the last part of a variable name is the field name converted
2882 to lower case with dashes replaced by underscores 2882 to lower case with dashes replaced by underscores
2883 </tag-desc> 2883 </tag-desc>
2884 2884
2885 <tag-name><var>$server_addr</var></tag-name> 2885 <tag-name id="var_server_addr"><var>$server_addr</var></tag-name>
2886 <tag-desc> 2886 <tag-desc>
2887 an address of the server which accepted a request 2887 an address of the server which accepted a request
2888 <para> 2888 <para>
2889 Computing a value of this variable usually requires one system call. 2889 Computing a value of this variable usually requires one system call.
2890 To avoid a system call, the <link id="listen"/> directives 2890 To avoid a system call, the <link id="listen"/> directives
2891 must specify addresses and use the <literal>bind</literal> parameter. 2891 must specify addresses and use the <literal>bind</literal> parameter.
2892 </para> 2892 </para>
2893 </tag-desc> 2893 </tag-desc>
2894 2894
2895 <tag-name><var>$server_name</var></tag-name> 2895 <tag-name id="var_server_name"><var>$server_name</var></tag-name>
2896 <tag-desc> 2896 <tag-desc>
2897 name of the server which accepted a request 2897 name of the server which accepted a request
2898 </tag-desc> 2898 </tag-desc>
2899 2899
2900 <tag-name><var>$server_port</var></tag-name> 2900 <tag-name id="var_server_port"><var>$server_port</var></tag-name>
2901 <tag-desc> 2901 <tag-desc>
2902 port of the server which accepted a request 2902 port of the server which accepted a request
2903 </tag-desc> 2903 </tag-desc>
2904 2904
2905 <tag-name><var>$server_protocol</var></tag-name> 2905 <tag-name id="var_server_protocol"><var>$server_protocol</var></tag-name>
2906 <tag-desc> 2906 <tag-desc>
2907 request protocol, usually 2907 request protocol, usually
2908 “<literal>HTTP/1.0</literal>” 2908 “<literal>HTTP/1.0</literal>”
2909 or 2909 or
2910 “<literal>HTTP/1.1</literal>” 2910 “<literal>HTTP/1.1</literal>”
2911 </tag-desc> 2911 </tag-desc>
2912 2912
2913 <tag-name><var>$status</var></tag-name> 2913 <tag-name id="var_status"><var>$status</var></tag-name>
2914 <tag-desc> 2914 <tag-desc>
2915 response status 2915 response status
2916 </tag-desc> 2916 </tag-desc>
2917 2917
2918 <tag-name> 2918 <tag-name id="var_tcpinfo_">
2919 <var>$tcpinfo_rtt</var>, 2919 <var>$tcpinfo_rtt</var>,
2920 <var>$tcpinfo_rttvar</var>, 2920 <var>$tcpinfo_rttvar</var>,
2921 <var>$tcpinfo_snd_cwnd</var>, 2921 <var>$tcpinfo_snd_cwnd</var>,
2922 <var>$tcpinfo_rcv_space</var> 2922 <var>$tcpinfo_rcv_space</var>
2923 </tag-name> 2923 </tag-name>
2924 <tag-desc> 2924 <tag-desc>
2925 information about the client TCP connection; available on systems 2925 information about the client TCP connection; available on systems
2926 that support the <c-def>TCP_INFO</c-def> socket option 2926 that support the <c-def>TCP_INFO</c-def> socket option
2927 </tag-desc> 2927 </tag-desc>
2928 2928
2929 <tag-name><var>$uri</var></tag-name> 2929 <tag-name id="var_uri"><var>$uri</var></tag-name>
2930 <tag-desc> 2930 <tag-desc>
2931 current URI in request, <link id="location">normalized</link> 2931 current URI in request, <link id="location">normalized</link>
2932 <para> 2932 <para>
2933 The value of <var>$uri</var> may change during request processing, 2933 The value of <var>$uri</var> may change during request processing,
2934 e.g. when doing internal redirects, or when using index files. 2934 e.g. when doing internal redirects, or when using index files.