nginx http核心模块指令(二)
directio
syntax: directio [size|off]
default: directio off
context: http, server, location
该指令可以指定一个大小,当读取的文件长度超过该值时将会使用 O_DIRECT (FreeBSD, Linux), F_NOCACHE (Mac OS X) 或者directio() (Solaris)接口来读取文件,提升性能,对于较大文件比较有用。
error_page
syntax: error_page code [ code... ] [ = | =answer-code ] uri | @named_location
default: no
context: http, server, location, if in location
这个指令指定了定位错误时显示的错误页面的位置
index
syntax: index file [file...]
default: index index.html
指定哪个文件为入口文件keepalive_timeout
syntax: keepalive_timeout [ time ]
default: keepalive_timeout 75
context: http, server, location
心跳超时时间listen
syntax: listen address:port [ default [ backlog=num | rcvbuf=size | sndbuf=size | accept_filter=filter | deferred | bind | ssl ] ]
default: listen 80
context: server
指定监听的地址和端口limit_rate_after
syntax: limit_rate_after time
default: limit_rate_after 1m
context: http, server, location, if in location
该指令用于第一部分发送之后限制速度
location
syntax: location [=|~|~*|^~] /uri/ { ... }
default: no
context: server
指定 URI,可以是字符串或正则表达式root
syntax: root path
default: root html
context: http, server, location, if in location
指定URL根路径server
syntax: server {...}
default: no
context: http
指定虚拟主机
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)