国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? ??? ?? PHP ???? nginx ????

nginx ????

Aug 08, 2016 am 09:23 AM
lua nginx quot shell

Nginx? Lua

??? ??? ??: ??? ???? ??? ?? ?? ?? ?? ?????! Nginx? ??? ????, Lua? ??? ?????. ? ?? ??? ??? ?? ?? ?? ??? ??? ??? ??? ????.

OpenResty? Nginx? Lua? ??? ??? ???? Nginx? Lua? ???? ngx_lua ??? ??? Tengine?? ngx_lua ??? ???? ????. ? ??? ???? ??? ????. OpenResty? Nginx ???? Tengine? Nginx? ?????. OpenResty? Tengine? ?? ???? ?? ?????? ?? ??? ??? ????. ??? ?? Chun Ge? Xiaozhe? ???? ??? ?? Taobao? ?????.

OpenResty? Tengine? ??? ??? ?? ????? ????. ?? ??? ?????.

  • ngx_openresty: Lua? ??? Nginx ???
  • Taobao Nginx ??????, ??? ?? ? ?? ??

Tech-Club?? Chun Ge? "Lua? ??? Nginx ?? ??"? ?? ??? ?? ?? ?? ????. ????? ??? ???!

??

?? ?? ??? Nginx, LuaJIT, ngx_devel_kit, ngx_lua ? ?? ?? ??? ?????.

Lua? LuaJIT ??? ????? ???? ???? LuaJIT ??? ?????.

shell> wget http://luajit.org/download/LuaJIT-.tar.gz shell> tar zxvf LuaJIT-.tar.gz shell> cd LuaJIT- shell> make shell> make install

?? ??? ???? ??? LuaJIT? ???? lib? include? ?? /usr/local ????? ????.

shell> export LUAJIT_LIB=/usr/local/lib shell> export LUAJIT_INC=/usr/local/include/luajit-

?? Nginx? ???? ? ????.

shell> wget http://nginx.org/download/nginx-.tar.gz shell> tar zxvf nginx-.tar.gz shell> cd nginx- shell> ./configure --add-module=/path/to/ngx_lua \ --add-module=/path/to/ngx_devel_kit shell> make shell> make install

Nginx? ???? ?? ?? ??? ???? ?? ??? ??? ? ????.

?? ?? ??? ? ? ????: ?? ???? ????? ????

??? ?????? ldd ??? ???? ??? ??? ? ????.

shell> ldd /path/to/nginx libluajit-.so => not found

??? ??? ????? ldconfig ??? ???? ??? ? ????.

shell> echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf shell> ldconfig

Nginx? ?? ??? ?? ??? ?? ????.

??????

?? ??? ?????? ??? ??????. Nginx ?? ?? nginx.conf? ?? ??? ???? Nginx? ?? ??? ?? ???? ???? ?? ??? ? ????.

location /lua { set $test "hello, world."; content_by_lua ' ngx.header.content_type = "text/plain"; ngx.say(ngx.var.test); '; }

ngx_lua? ??? ??? ?? Chun ??? ??? Nginx ????? ?? ?? ?? ??? ????.

??? ?? ??? ?? ????????. Nginx ?? ??? ???? ??? ????? "???"? ?? "???"???. Nginx? ??? ??? ? ???? ??? ???? ??? ??? ??? ?? ???? ?? ??? ???? ?? ??? ?? ?????. Nginx?? ????? ???? ??? ??? ??, ??? ??, ??? ?????. , ?. . ?? ??? set ???? rewrite ??? ???, content_by_lua ???? content ??? ????. ? ???? ??? ??? ?? ????? ??? ????? ???? ?? ? ? ????.

Redis? ???? ? ? ???? ??? ??? ?????.

?? ?? ???? Redis ?? ?? config.json? ???? ???.

{ "host": "", "port": "" }

?? ?? ?? ??? ?? ???? init.lua ????? ?????. ?? CJSON ??:

local cjson = require "cjson"; local config = ngx.shared.config; local file = io.open("config.json", "r"); local content = cjson.decode(file:read("*all")); file:close(); for name, value in pairs(content) do config:set(name, value); end

??: ???? ?? ???? ????? ?? ??? ???? ?? ??? ?? ??? ??? ????.

???? Resty? ???? ???? ????? ???? content.lua? ????. Redis ??:

ngx.header.content_type = "text/plain"; local redis = require "resty.redis"; local config = ngx.shared.config; local instance = redis:new(); local host = config:get("host"); local port = config:get("port"); local ok, err = instance:connect(host, port); if not ok then ngx.log(ngx.ERR, err); ngx.exit(ngx.HTTP_SERVICE_UNAVAILABLE); end instance:set("name", "laowang"); local name = instance:get("name") instance:close(); ngx.say("name: ", name);

??: Resty Redis ??? ???? ????? ?? ??? Nginx?? ???? ?? ????.

????? Nginx ?? ???? ?? ???? ???.

lua_shared_dict config 1m; lua_package_path "/path/to/vendor/?.lua;;"; init_by_lua_file /path/to/init.lua; server { lua_code_cache off; location /lua { content_by_lua_file /path/to/content.lua; } ... }

??: ???? ???? ?? ?? ???? ??? ?? lua_code_cache? ?? ???. ?? ????.

?? CJSON ?? ? Makefile? ?? ?? ??? ???? ???. ????

PREFIX = /usr/local LUA_INCLUDE_DIR = $(PREFIX)/include

LuaJIT? ???? ?????. ?? ??? ?? ????? ???? ?? ?? ????.

cp /usr/local/include/luajit-/* /usr/local/include/

??? ??? ??????? ? ??? ?? ?? ?????? ?????, ?? Nginx+Lua? ???????. ??? ?? ??? ?? ??? ??? ? ??? ?? ?? ?????.

????? ???? ?? ???? ??? ??????. Lua? ?? ?? ?????? ?? ???? ???????.

? ??? ?? ????? Lao Wang? ?? ?????? Lua ? Nginx ??? ???????. ????? ????? ?????.

"NGINX ? LUA"? ?? ??? 29? ????.


???? ??? ??? ??? nginx ????? ???????. PHP ????? ??? ?? ????? ??? ???? ?????.

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

?? ????
1744
16
Cakephp ????
1599
56
??? ????
1538
28
PHP ????
1397
31
???
Windows?? nginx? ???? ?? Windows?? nginx? ???? ?? Apr 14, 2025 pm 12:57 PM

Windows?? Nginx? ???? ??? ?????? nginx? ???? ?? ??? ??? ????. ?? ?? ??? ???? ?? ??? ??? ??????. ?? ?? ?? ?? Nginx. ??? ????? ? ????????. SSL? ????? ????? SSL ???? ??????. ?? 80 ? 443 ???? ????? ???? ????? ??????.

Docker? ????? ???? ?? Docker? ????? ???? ?? Apr 15, 2025 pm 12:27 PM

Docker Container Startup ?? : ???? ???? ??? : "Docker Pull [Mirror Name]"? ??????. ???? ?? : "docker"[??] [?? ??] [?? ? ?? ??]? ??????. ????? ?????? : "Docker start [???? ?? ?? ID]"? ??????. ???? ?? ?? : ????? "Docker PS"? ?? ??? ??????.

Docker ????? ??? ???? ?? Docker ????? ??? ???? ?? Apr 15, 2025 pm 12:21 PM

??? ??? Docker ???? ??? ?? ? ? ??????. ?? ???? (Docker PS)? ??????. ???? ??? ?????? (GREP ?? ??). ???? ?? ( "??"?? ??)? ?????.

nginx? ?????? ???? ?? nginx? ?????? ???? ?? Apr 14, 2025 pm 01:03 PM

nginx? ?????? ???? ?? : 1. ?? ?? ?????? : SystemCTL ?? nginx (linux/unix), netstat -ano | Findstr 80 (Windows); 2. ?? 80? ?? ??? ??????. 3. ??? ???? nginx ?? ???? ??????. 4. Nagios, Zabbix ? Icinga? ?? ?? ??? ??????.

Docker ? ????? ??? ?? Docker ? ????? ??? ?? Apr 15, 2025 pm 12:18 PM

Docker?? ???? ??? : 1. ???? ??? : Docker Pull [Mirror Name] 2. ???? ??? : Docker Run [??] [?? ??] [??] 3. ???? ?? : Docker Start [???? ??]

nginx? ???? ?? nginx? ???? ?? Apr 14, 2025 pm 01:06 PM

?? : nginx? ???? ??? ?? : nginx ??? ? ?? nginx verification nginx is nginx ?? ?? ?? ??? ???? ?????.

nginx? apache ??? ?? : ??? ?? ?? nginx? apache ??? ?? : ??? ?? ?? Apr 15, 2025 am 12:04 AM

Nginx? Apache? ?? ? ??? ??? ??? ?? ????? ?????. 1.NGINX? ?? ??? ? ?? ?? ?? ????? ?????. 2. Apache? ??? ?? ? ??? ??? ??? ????? ?????. ?? ??, ?? ?? ? ?? ??? ???? ??? ?? ??? ?? ?????? ??? ? ????.

Centos? PHPStorm ?? ??? ?? Centos? PHPStorm ?? ??? ?? Apr 14, 2025 pm 05:30 PM

CentOS ????? PHPStorm ?? ????? ???? ?? ??? CentOS ????? PHPStorm? ??? ????? ?? ???? ????? ? ????? ??? ??? ?????. ??? ??? ???? ?? ??? ???? ???? ??? ???? ??? ??????. 1. ??? ?? ??? ? ??? ??? ??? : ??? ?? ??? ??? ?? ???? ??? ??? ? ??? ???????. ??????? ?? : ??? ?????? ???? ?? ?? ??????? ??? ???? ???? ?? ??? ? ????. ?? ????? ?? : ? ?? ???? ?? ????? ??? ? ???? ???? ??? ???? ??????. 2. PHP ?? ??? ??? OPCACHE : ????? ? OPCACHE ?? ?? ?? ? ??

See all articles