摘要: Nginx访问控制 一、黑(白)名单 [root@web-nginx conf.d]# vim access-control.conf server { listen 80; server_name www.access-control.com; access_log /var/log/nginx/ 阅读全文
posted @ 2021-08-20 11:37 破碎的屋檐 阅读(37) 评论(0) 推荐(0) 编辑
摘要: Rewrite和常用指令 rewrite 常用正则表达式说明 小括号()之间匹配的内容,可以在后面通过$1来引用,$2表示的是前面第二个()里的内容。正则里 面容易让人困惑的是\转义特殊字符。 一、rewrite实例 rewrite语法 last 本条规则匹配完成后,继续向下匹配新的location 阅读全文
posted @ 2021-08-19 13:59 破碎的屋檐 阅读(696) 评论(0) 推荐(0) 编辑
摘要: | ## Rewrite和常用指令 | | | | rewrite 常用正则表达式说明 小括号()之间匹配的内容,可以在后面通过$1来引用,$2表示的是前面第二个()里的内容。正则里 面容易让人困惑的是\转义特殊字符。 | | | | ## 一、rewrite实例 | | | | ### rewri 阅读全文
posted @ 2021-08-18 23:26 破碎的屋檐 阅读(2498) 评论(0) 推荐(0) 编辑
摘要: nginx模块添加 下载需要添加的模块 git clone https://github.com/cuber/ngx_http_google_filter_module [root@web-nginx ~]# nginx -V nginx version: nginx/1.20.1 built by 阅读全文
posted @ 2021-08-18 09:53 破碎的屋檐 阅读(57) 评论(0) 推荐(0) 编辑
摘要: php编译安装 1.依赖包 #编译环境依赖包 [root@localhost ~]# yum -y install gcc gcc-c++ glibc automake autoconf libtool make [root@localhost ~]# mkdir -p /usr/local/php 阅读全文
posted @ 2021-08-18 09:36 破碎的屋檐 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Nginx动静分离 环境 代理 192.168.133.161 静态 192.168.133.160 动态 192.168.133.162 客户端 [root@proxy-nginx conf.d]# cat /etc/hosts 192.168.133.161 www.up-proxy.com 代 阅读全文
posted @ 2021-08-17 18:14 破碎的屋檐 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 一、nginx负载均衡 配置方法 upstream server { server 192.168.133.161:80; server 192.168.133.160:80; } #假设代理服务器IP为192.168.133.162 server { listen 80; server_name 阅读全文
posted @ 2021-08-17 17:16 破碎的屋檐 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Nginx反向代理 环境 代理服务器 192.168.133.161 web服务 192.168.133.160 代理端: # vim /etc/nginx/nginx.conf worker_processes 1; error_log logs/error.log; worker_rlimit_ 阅读全文
posted @ 2021-08-17 15:37 破碎的屋檐 阅读(90) 评论(0) 推荐(0) 编辑
摘要: nginx编译安装及配置 nginx下载官网:nginx: download 关闭防火墙和selinux [root@localhost ~]# wget -P /usr/local/src/ http://nginx.org/download/nginx-1.20.1.tar.gz [root@l 阅读全文
posted @ 2021-08-16 11:39 破碎的屋檐 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 主配置文件/etc/nginx/nginx.conf user nginx; worker_processes 1; error_log /var/log/nginx/nginx_error.log; pid /usr/local/nginx/run/nginx.pid; events { work 阅读全文
posted @ 2021-08-15 23:53 破碎的屋檐 阅读(352) 评论(0) 推荐(0) 编辑