用于输出nginx的基本状态信息 Syntax: stub_status; Default: — Context: server, location 输出信息示例: Active connections:291server accepts handled requests #下面三个数分别对应accepts,handled,requests166309481663094831070465Reading:6Writing:179Waiting:106Active connections:#当前状态,活动状态的连接数 accepts:#...
# curl -v -H "Cache-Control:no-cache" http://test.local/p/100 * Trying 127.0.0.1... * Connected to test.local (127.0.0.1) port 80 (#0) > GET /p/100 HTTP/1.1 > Host: test.local > User-Agent: curl/7.43.0 > Accept: */* > Cache-Control:no-cache > < HTTP/1.1 404 Not...
set $stats_group "sub.example.com"; log_by_lua_file /etc/nginx/lua/stats/log.lua; location / { proxy_pass "http://127.0.0.1:8081"; proxy_cache g_cache; } } server { listen 80 default_server; server_name _; log_by_lua_file /etc/nginx/lua/stats/log.lua; return 404; } } ...
#error_page 404 /404.html;# redirect server error pages to the static page /50x.html # error_page 500502503504 /50x.html;location = /50x.html { root html;} 重新加载配置⽂件 [root@node1 ~]# nginx -t nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax...