首页 > 其他 > 详细

Nginx服务学习(7)-模块学习

时间:2018-01-08 21:39:29      阅读:199      评论:0      收藏:0      [点我收藏+]

模块

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

Nginx服务学习(7)-模块学习

原文:http://blog.51cto.com/11512826/2058793

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!