博文

目前显示的是 三月, 2018的博文

Nginx配置说明

#######日志配置####### #1.access_log指令 #access_log、log_format、open_log_file_cache、log_not_found、log_subrequest、rewrite_log、error_log #1.access_log指令 #access_log path [format [buffer=size [flush=time]]]; #access_log path format gzip[=level] [buffer=size] [flush=time]; #access_log syslog:server=address[,parameter=value] [format]; #access_log off; #默认值: access_log logs/access.log combined; #配置段: http, server, location, if in location, limit_except #gzip压缩等级/buffer设置内存缓存区大小/flush保存在缓存区中的最长时间/不记录日志:access_log off; #使用默认combined格式记录日志:access_log logs/access.log 或 access_log logs/access.log combined; #2.log_format指令 # 格式名称 #语法: log_format name string …;默认值: log_format combined “…”;配置段: http #log_format有一个默认的无需设置的combined日志格式,相当于apache的combined日志格式,如下所示: #log_format  combined  '$remote_addr - $remote_user  [$time_local]  '     #                             ...