zoukankan      html  css  js  c++  java
  • Nginx 基础

    日期格式 

    http_请求头, arg_参数

    使用 比如User-Agent 则 $http_user_agent

     log_format  名称  '$http_*******'

    模块

    sub_status          查看连接,请求状态  常配置在http server location中

    random_index     随机主页

    sub_filter             替换返回内容

           sub_filter '<h1>Admin' '<h1>ggggg'; //第一个参数是要被替换的,第二个参数是替换后的

      sub_filter_once off;   //替换所有的,默认是on,替换第一个

    sub_filter_last_modified  on|off    修改最  常配置缓存时使用  default off

    sub_filter_on    on|off   替换第一个字符串   default on

    连接, 请求限制

     limt_conn_zone key zone=name:size

    作用域 : http

     limit_conn zone(上面的名字) number;

    作用域: http,server,location

     limt_req_zone key zone=name:size rate=rate;    rate=1r/s 表示每s一次

    作用域 : http

     limit_req zone(上面的名字) [burst=number 下一秒多少可以请求] [nodelay];

    作用域: http,server,location

    访问模块 http_access_module

    allow IP

    deny all 

    auth_basic 通过htpasswd 生成文件密码信息

      2 alias 与 root区别

    IP黑白名单

    # location ~ ^/admin.html {
    # root /opt/app/code;
    # deny 222.128.189.17;
    # allow all;
    # index index.html index.htm;
    # }
    
    location ~ ^/admin.html {
    root /opt/app/code;
    allow 222.128.189.0/24;
    deny all;
    index index.html index.htm;
    }
  • 相关阅读:
    Android之基于XMPP即时通讯(转)
    开机启动service小DEMO
    Android 歌词同步滚动效果(转)
    OC中的消息传递和初始化
    oc中对象的初始化
    c语言的结构体字节数统计
    css的页面布局
    说一说我理解的css
    什么是js闭包
    我对js作用域的理解
  • 原文地址:https://www.cnblogs.com/eason-d/p/11201934.html
Copyright © 2011-2022 走看看