摘要: 第1章 LNMP单机环境安装 1.Nginx安装 groupadd www -g 1000 useradd www -s /sbin/nologin -M -u 1000 -g 1000 id www cat > /etc/yum.repos.d/nginx.repo << 'EOF' [nginx 阅读全文
posted @ 2021-11-26 22:40 zhaocheng690 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 第41题 概念题: 1.location和rewrite的区别 Nginx location 可以控制访问网站的路径,但是一个server可以有多个location配置。 rewrite 指令可以基于用户请求的RUI通过正则表达式的匹配来进行改写。 rewrite 指令可以存在多条,并且按照次序依次 阅读全文
posted @ 2021-11-26 22:06 zhaocheng690 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 第1章 Nginx rewrite跳转 1.官方地址 https://nginx.org/en/docs/http/ngx_http_rewrite_module.html 2.应用场景 http跳转https 旧站点跳转到新站点 根据终端类型进行跳转到不同页面 根据不同地址跳使用不同的代码目录 3 阅读全文
posted @ 2021-11-26 21:54 zhaocheng690 阅读(64) 评论(0) 推荐(0) 编辑
摘要: Nginx 进阶 不是太重要: 1.索引模块 2.限速模块 3.认证模块 4.状态模块 5.yum仓库 非常重要: 1.location 2.rewrite 第一章 索引模块 1.官方地址 http://nginx.org/en/docs/http/ngx_http_index_module.htm 阅读全文
posted @ 2021-11-26 21:40 zhaocheng690 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 第一章 Nginx 安装 1.配置Nginx 官方yum源 cat > /etc/yum.repos.d/nginx.repo << 'EOF' [nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/cento 阅读全文
posted @ 2021-11-26 21:15 zhaocheng690 阅读(21) 评论(0) 推荐(0) 编辑