模块
http_stub_status_module配置:##Nginx的客户端状态
语法:
Syntax: stub_status;
Default: --
Context: server,location
实例:在/etc/nginx/conf.d/default.conf下配置
server {
location /mystatus {
stub_status;
}
}
检查语法:nginx -tc /etc/nginx/nginx.conf
浏览器访问:http://192.168.102.132/mystatus
--with-http_random_index_module ##目录中选择一个随机主页
语法:
Syntax: random_index on | off;
Default: random_index off;
Context: location;
实例:在/etc/nginx/conf.d/default.conf下的location下配置:
location / {
root /opt/app/code;
random_index on;
index index.html index.htm;
}
#随机选择对应主目录下的随机主页,(隐藏文件不会选择,如:.3.html文件)
--with-http_sub_module ##HTTP内容替换
语法:
Syntax: sub_filter string replacement;
Default: --
Context: http,server,location
Syntac: sub_filter_last_modified on | off;
Default: sub_filter_last_modified off;
Context: http,server,location
Syntac: sub_filter_once on | off;
Default: sub_filter_once on;
Context: http,server,location
原文地址:http://blog.51cto.com/11512826/2058793
时间: 2024-10-10 09:06:25