Nginx学习--之基于Nginx的中间件架构

1.http请求

request -包括请求行、请求头、请求数据
    respone -包括状态行、消息报头、相应正文

2.Nginx日包括error.log access_logginx变量

HTTP请求变量 -arg_PARAMETER 、 http_HEADER、 sent_http_HEADER
    内置变量 - Nginx内置的
    自定义变量 -自己定义

4.Nginx模块
官方

    http_stub_status_module(nginx的客户端状态)
        Systax:stub_status
        Default:--
        Context:server,location
    http_random_index_moudule(目录中选择一个随机的主页)
        Systax:random_index on|off
        Default:random_index off
        Context:location

    http_sub_module(http内容替换)
        Systax:sub_filter string(要替换的内容) replacement(替换后的内容);
        Default:--
        Context:http ,server,location

        Systax:sub_filter_last_modified on|off;(检测有更新--应用于缓存)
        Default:sub_filter_last_modified off;
        Context:http ,server,location

        Systax:sub_filter_once on|off;(on替换第一个,off替换所有)
        Default:sub_filter_once on;
        Context:http ,server,location

5.Nginxde的请求限制

连接频率限制 - limit_conn_module

请求频率限制 - linit_req_module

6.HTTP协议的连接与请求

HTTP协议版本    连接关系
    HTTP1.0     TCP不能复用
    HTTP1.1     顺序性TCP复用
    HTTP2.0     多路复用TCP复用

7.连接限制

Systax:limit_conn_zone key zone=name:size;
    Default:--
    Context:http 

    Systax:limit_conn_zone number;(并发限制:数量)
    Default:--
    Context:http ,server,location

8.请求限制

    Systax:limit_req_zone key zone=name:size rate=rate;
    Default:--
    Context:http 

    Systax:limit_req zone=name[burst=number][nodelay];
    Default:--
    Context:http , server, location

log_format
Systax:log_format name [escape = default|json] string …]
Default:log_format combined “…”
Context:http

nginx的访问控制
1.基于Ip的访问控制 http_access_moudule
Systax:allow address/deny |CIDR |unix: | all;
Default:–
Context:http,server,location,limit_except
2.基于用户的信任登录 http_auth_basic_module

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值