摘要:
负载均衡服务器配置: 注意:upstream和server同级 案例: 建立两个基于端口的虚拟主机来模拟两台web服务器。 (1)新建一个www.123.com:81和www.123.com:82的虚拟主机 在extra目录下面新建一个81.conf文件,内容如下: 在extra目录下面新建一个82 阅读全文
摘要:
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 阅读全文
摘要:
Nginx rewrite主要功能是实现URL地址重写,需要PCER的支持,前面已经安装。 语法: rewrite 匹配url 目标url [flag],应用位置 server location if段中。 rewrite 是实现URL重写的关键指令,根据匹配url部分的内容,重定向到目录url上, 阅读全文
摘要:
http段中定义格式 在日志格式样式中: $remote_addr和$http_x_forwarded_for用于记录IP地址 $remote_user用于记录远程客户端用户名称; $time_local用于记录访问时间与时区; $request用于记录请求URL与HTTP协议; $status用于 阅读全文
摘要:
全局配置 事件配置 虚拟主机的配置 • 基于域名配置 1.在nginx目录中新建一个zcom的文件夹,并在里面建立index.html文件. 2,在nginx.conf配置文件中http段中添加server段 自定义servier server{ listen 80; server_name z.c 阅读全文
摘要:
http://nginx.org/en/docs/configure.html 阅读全文
摘要:
准备库 install -y automake autoconf libtool make gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel 主要是用到了pcre pcre-devel 先装pcre, zlib,前者为 阅读全文