摘要: 作用 1. 制定并允许检查请求的链接的真实性以及保护资源免遭未经授权的访问 2. 限制链接生效周期 首先检查nginx是否已安装模块 输出nginx所有已安装模块,检查是否有ngx_http_secure_link_module 原理图 语法 配置nginx 用php生成测试安全下载链接,由于配置有 阅读全文
posted @ 2019-05-22 21:52 琴似蓝调 阅读(997) 评论(0) 推荐(0) 编辑
摘要: nginx的模块是需要重新编译nginx,而不是像apache一样配置文件引用.so 这里以安装第三方ngx_http_google_filter_module模块为例 1. 下载第三方扩展模块ngx_http_google_filter_module 2. 查看nginx编译安装时安装了哪些模块 阅读全文
posted @ 2019-05-22 21:34 琴似蓝调 阅读(1662) 评论(0) 推荐(0) 编辑
摘要: 关闭keep live,提高链接回收 events{ worker_connections 1024; } 阅读全文
posted @ 2019-05-22 10:24 琴似蓝调 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 负载均衡服务器配置: 注意:upstream和server同级 案例: 建立两个基于端口的虚拟主机来模拟两台web服务器。 (1)新建一个www.123.com:81和www.123.com:82的虚拟主机 在extra目录下面新建一个81.conf文件,内容如下: 在extra目录下面新建一个82 阅读全文
posted @ 2019-05-22 10:02 琴似蓝调 阅读(238) 评论(0) 推荐(0) 编辑
摘要: https://nginx.org/en/docs/http/ngx_http_gzip_module.html https://nginx.org/en/docs/http/ngx_http_gunzip_module.html https://nginx.org/en/docs/http/ngx 阅读全文
posted @ 2019-05-22 09:47 琴似蓝调 阅读(1195) 评论(0) 推荐(0) 编辑
摘要: Nginx rewrite主要功能是实现URL地址重写,需要PCER的支持,前面已经安装。 语法: rewrite 匹配url 目标url [flag],应用位置 server location if段中。 rewrite 是实现URL重写的关键指令,根据匹配url部分的内容,重定向到目录url上, 阅读全文
posted @ 2019-05-22 09:39 琴似蓝调 阅读(176) 评论(0) 推荐(0) 编辑
摘要: http段中定义格式 在日志格式样式中: $remote_addr和$http_x_forwarded_for用于记录IP地址 $remote_user用于记录远程客户端用户名称; $time_local用于记录访问时间与时区; $request用于记录请求URL与HTTP协议; $status用于 阅读全文
posted @ 2019-05-22 08:49 琴似蓝调 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 全局配置 事件配置 虚拟主机的配置 • 基于域名配置 1.在nginx目录中新建一个zcom的文件夹,并在里面建立index.html文件. 2,在nginx.conf配置文件中http段中添加server段 自定义servier server{ listen 80; server_name z.c 阅读全文
posted @ 2019-05-22 08:36 琴似蓝调 阅读(222) 评论(0) 推荐(0) 编辑
摘要: http://nginx.org/en/docs/configure.html 阅读全文
posted @ 2019-05-22 08:23 琴似蓝调 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 准备库 install -y automake autoconf libtool make gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel 主要是用到了pcre pcre-devel 先装pcre, zlib,前者为 阅读全文
posted @ 2019-05-22 08:22 琴似蓝调 阅读(265) 评论(0) 推荐(0) 编辑