摘要: nginx upstream 放于http{}标签中 默认算法是wrr(权重轮询 weighted round-robin)配置例子upstream example { server test.example.com weight=5; server test2.example.com:8090 m 阅读全文
posted @ 2019-11-04 22:52 zyxywy 阅读(712) 评论(0) 推荐(0) 编辑
摘要: iptables只是Linux防火墙的管理工具。实现防火墙功能的是netfilter,是内核中数据包处理模块;功能: 网络地址转换NAT 数据包内容修改 数据包过滤等四表: filter表:负责包过滤功能,防火墙。 nat表:用于网络地址转换(IP、PORT) mangle表:修改数据包的服务类型、 阅读全文
posted @ 2019-10-24 23:25 zyxywy 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 指令作用: 匹配指定的请求URI语法: location [=|~|~*|^~|@] /uri/ {configuration}匹配命令: ~ 表示执行一个正则匹配,区分大小写 ~* 表示执行一个正则匹配,不区分大小写 ^~ 表示普通字符匹配,如果该选项匹配,只匹配该选项,不匹配其他。一般用来匹配目 阅读全文
posted @ 2019-09-16 23:29 zyxywy 阅读(910) 评论(0) 推荐(0) 编辑
摘要: #/bin/bash#install nginx#envPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bininstall_path=/usr/local/src#check rootNowUser=`id - 阅读全文
posted @ 2019-08-22 23:59 zyxywy 阅读(455) 评论(0) 推荐(0) 编辑
摘要: 2、poll: 3、epoll: 4、rtsig: 5、kqueue: 6、/dev/poll: 7、eventport: 阅读全文
posted @ 2019-08-21 22:15 zyxywy 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #运行用户 user nobody; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs 阅读全文
posted @ 2019-08-21 22:01 zyxywy 阅读(640) 评论(0) 推荐(0) 编辑
摘要: 1、Nginx命令行参数 Nginxj仅有几个命令行参数,完全通过配置文件来配置 -c </path/to/config> :为Nginx指定一个配置文件,来代替缺省的。 -t :不运行,仅仅测试配置文件。检查配置文件的语法的正确性。 -v:显示nginx的版本。 -V:显示nginx的版本,编译器 阅读全文
posted @ 2019-08-19 23:51 zyxywy 阅读(205) 评论(0) 推荐(0) 编辑
摘要: nginx参数: --prefix= 指向安装目录 --sbin-path 指向(执行)程序文件(nginx) --conf-path= 指向配置文件(nginx.conf) --error-log-path= 指向错误日志目录 --pid-path= 指向pid文件(nginx.pid) --lo 阅读全文
posted @ 2019-08-18 14:33 zyxywy 阅读(2861) 评论(1) 推荐(0) 编辑
摘要: #!/bin/sh## nginx - this script starts and stops the nginx daemin## chkconfig: - 85 15 # description: Nginx is an HTTP(S) server, HTTP(S) reverse \# p 阅读全文
posted @ 2019-08-18 13:36 zyxywy 阅读(152) 评论(0) 推荐(0) 编辑
摘要: nginx 安装 1、编译安装 前提;需要编译环境,gcc、g++开发库之类 centos下 安装make yum -y install gcc automake autoconf libtool make 安装g++ yum install gcc gcc-c++ ubuntu apt-get i 阅读全文
posted @ 2019-01-23 20:47 zyxywy 阅读(267) 评论(0) 推荐(0) 编辑