提交 0e488d49 authored 作者: zhanrongzhen's avatar zhanrongzhen

add log format

上级 2a31dfd9
worker_processes auto;
error_log logs/error.log warn;
events {
worker_connections 1024;
......@@ -9,12 +8,18 @@ http {
include mime.types;
default_type application/octet-stream;
log_format main_with_time '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $request_time';
lua_package_path "/usr/local/openresty/lualib/?.lua;;";
lua_shared_dict file_check_cache 10m;
server {
listen 8080;
server_name localhost;
access_log logs/access.log main_with_time;
error_log logs/error.log main_with_time warn;
# 静态资源根目录
set $root_path "/var/www/html";
......@@ -35,7 +40,7 @@ http {
local max_retries = 10 -- 重试次数(含首次检查)
local retry_delay = 1 -- 重试延迟(秒)
ngx.log(ngx.WARN, "AFA request filpath: ", filepath, "filename: ",filename)
ngx.log(ngx.WARN, "AFA request filpath: ", filepath, " filename: ",filename)
local mime_types = {
["html"] = "text/html",
["css"] = "text/css",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论