Nginx 변수 에 대한 설명

15019 단어 nginx
이 블 로 그 는 nginx 의 변수 즉 의 미 를 기록 하기 위 한 것 입 니 다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 nginx-lua api ngx.arg , content_by_lua_file ngx. var   ,ngx. var .VARIABLE ngx.ctx lua ngx.header ,ngx.header.HEADER ngx.status   API ngx.log error.log print ngx.log(ngx.NOTICE, …) ngx.send_headers ngx.headers_sent ngx.resp.get_headers ngx.timer.at ngx.is_subrequest ngx.location.capture ngx.location.capture_multi ngx.print ngx.say , ’
ngx.flush ngx.exit ngx.sleep ( ) ngx.on_abort client ngx.req.start_time ngx.req.http_version HTTP ngx.req.raw_header ( ) ngx.req.get_method ngx.req.set_method ngx.req.set_uri URL ngx.req.get_uri_args ngx.req.get_post_args ngx.req.get_headers ngx.escape_uri url ngx.unescape_uri url ngx.encode_args table ngx.decode_args table ngx.encode_base64 base64 ngx.decode_base64 base64 ngx.crc32_short crs32_short ngx.crc32_long crs32_long ngx.hmac_sha1 hmac_sha1 ngx.md5 16 MD5 ngx.md5_bin 2 MD5 ngx.sha1_bin 2 sha1 ngx.quote_sql_str SQL ngx.today ngx.time UNIX ngx.now ngx.update_time ngx.cookie_time cookie ngx.http_time HTTP ngx.parse_http_time HTTP
다음은 nginx 프로필 과 관련 된 필드 와 의미 설명 입 니 다. mark 도 참고 하 세 요.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 Nginx :nginx.conf,nginx.conf :   #    , CPU * worker_processes   1 ; events {      # nginx      # 1 word , 1024       worker_connections   1024 ; }   # HTTP http {      #      server {           # , 。           location  {                                 }      }       server {                             } }   # , nginx #nobody , #user nobody;   #nginx , cpu cpu # cat /proc/cpuinfo worker_processes   1 ;   # #nginx error_log ( :debug crit ): #[ debug | info | notice | warn | error | crit ] # :error_log logs/nginx_error.log  crit; # : nginx logs/nginx_error.log , crit , ; error_log  logs/error.log; error_log  logs/notice.log  notice; error_log  logs/info.log  info;   #PID , nginx ID pid        logs/nginx.pid;     # worker , linux ulimit # :ulimit -n #Linux , , liunx ulimit # linux   65535   worker_rlimit_nofile  65535 ;   # events {     # ( ),nginx     # linux2. 6 , nginx     use     epoll;                 # worker     # worker_rlimit_nofile , http , , 。     worker_connections   65535 ; }   # http ,      http {           # mime , mime.type           #MIME(Multipurpose Internet Mail Extensions) 。 # , ,          include         /etc/nginx/mime.types;          default_type  application/octet-stream;          #      log_format  main   '[$remote_addr] - [$remote_user] [$time_local] "$request" '                        '$status $body_bytes_sent "$http_referer" '                        '"$http_user_agent" "$http_x_forwarded_for"' ;          access_log    / var /log/nginx/access.log;            #sendfile ,sendfile nginx sendfile , on, IO , off, I/O , 。 : off。          sendfile        on;          tcp_nopush     on; #          tcp_nodelay        on; #            #          #keepalive_timeout   0          keepalive_timeout   65 ; # ,                      # gzip          gzip  on;          gzip_disable  "MSIE [1-6]\." ; # IE6          gzip_min_length 1k; #          gzip_buffers  4   16k; #          gzip_http_version  1.0 ; # ( 1.1 , squid2. 5 1.0          gzip_comp_level  2 ; #          gzip_types text/plain application/x-javascript text/css application/xml; #          gzip_ var y on; # CDN , url,              #          client_header_buffer_size    1k;   #          large_client_header_buffers   4   4k;  #              #          upstream mysvr {              #weigth ,              server  192.168 . 8 .1x: 3128   weight= 5 ;              server  192.168 . 8 .2x: 80    weight= 1 ;              server  192.168 . 8 .3x: 80    weight= 6 ;          }            upstream mysvr2 {              #weigth ,              server  192.168 . 8 .x: 80    weight= 1 ;              server  192.168 . 8 .x: 80    weight= 6 ;          }            #         server {              # 80              listen        80 ;              #           #charset koi8-r;                # www.xx.com ,              server_name  www.xx.com;                #              access_log  logs/www.xx.com.access.log  main;            #              location / {                root   /root;      #                index index.php index.html index.htm;   #                   proxy_pass  http: //mysvr ;# mysvr                  client_max_body_size 10m;    #                client_body_buffer_size 128k;  # ,                    # .                  proxy_redirect off;                  # Web X-Forwarded-For IP                proxy_set_header Host $host;                proxy_set_header X-Real-IP $remote_addr;                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                proxy_connect_timeout  90 ;        #nginx ( )                proxy_send_timeout  90 ;        # ( )                proxy_read_timeout  90 ;        # , ( )                proxy_buffer_size 4k;             # (nginx)                proxy_buffers  4   32k;              #proxy_buffers , 32k ,                proxy_busy_buffers_size 64k;    # (proxy_buffers* 2                proxy_temp_file_write_size 64k;   # , , upstream            }            #          error_page    500   502   503   504   /50x.html;              location = /50x.html {              root   /root;          }            #          # jsp tomcat resin          location ~ .(jsp|jspx| do )?$ {              proxy_set_header Host $host;              proxy_set_header X-Real-IP $remote_addr;              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;              proxy_pass http: //127.0.0.1:8080;          }            # ,nginx          location ~ ^/(images|javascript|js|css|flash|media| static )/ {              root / var /www/virtual/htdocs;              # 30 , , , , 。              expires 30d;          }            # Nginx          location /NginxStatus {              stub_status            on;              access_log              on;              auth_basic               "NginxStatus" ;              auth_basic_user_file  conf/htpasswd;              #htpasswd apache htpasswd 。          }          # .htxxx          location ~ /\.ht {              deny all;          }            }      }

좋은 웹페이지 즐겨찾기