摘要: location的匹配 匹配符 匹配规则 优先级 = 精确匹配 1 ^~ 以某个字符串开头 2 ~ 区分大小写的正则匹配 3 ~* 不区分大小写的正则匹配 4 !~ 区分大小写不匹配的正则 5 !~* 不区分大小写不匹配的正则 6 / 通用匹配,任何请求都会匹配到 7 # 通用匹配,任何请求都会匹配 阅读全文
posted @ 2020-07-14 20:00 Gshelldon 阅读(353) 评论(0) 推荐(0)
摘要: nginx的常用模块 ngx_http_index_module Syntax: index file ...; Default: index index.html; Context: http, server, location location / { index index.html; } n 阅读全文
posted @ 2020-07-14 19:50 Gshelldon 阅读(633) 评论(0) 推荐(0)
摘要: nginx的日志管理 log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$h 阅读全文
posted @ 2020-07-14 19:41 Gshelldon 阅读(2138) 评论(0) 推荐(0)
摘要: nginx 的三种虚拟主机配置方法 nginx三种虚拟主机配置的方法. 基于端口 在生产环境中一般使用端口或者域名。 [root@web01 /etc/nginx/conf.d]# cat web01.conf server { listen 80; server_name 10.0.0.7; location / { root /c 阅读全文
posted @ 2020-07-14 19:19 Gshelldon 阅读(788) 评论(0) 推荐(0)
摘要: 官方源安装nginx、网站访问量相关术语、nginx主配置文件详解、自定义日志格式调用。 阅读全文
posted @ 2020-07-12 17:17 Gshelldon 阅读(1170) 评论(0) 推荐(0)
摘要: 什么是url ? url = 协议 + 域名 + 资源路径 比如: https://www.baidu.com/index.html http : 超文本传输协议 https: 安全套接字协议 HTTP的工作原理 访问https://mirrors.aliyun.com/centos-vault/r 阅读全文
posted @ 2020-07-12 12:21 Gshelldon 阅读(978) 评论(1) 推荐(1)
摘要: ssh协议 为什么使用ssh协议? 在进行传输时,会对数据进行加密,保证会话安全;telnet协议不是加密传输,在传输过程中如果被抓包,就会造成信息泄露,telnet默认不支持root远程。 # 常用协议端口 ftp 21 ssh 22 telnet 23 # 不支持root登陆 rsync 873 阅读全文
posted @ 2020-07-12 12:05 Gshelldon 阅读(340) 评论(0) 推荐(0)
摘要: sersync同步实战 sersync是基于inotify和srync的二次开发,代码托管在github上面在rsync的客户端上安装,下载地址: https://raw.githubusercontent.com/wsgzao/sersync/master/sersync2.5.4_64bit_b 阅读全文
posted @ 2020-07-12 11:40 Gshelldon 阅读(559) 评论(0) 推荐(0)
摘要: nfs共享文件存储 network filesystem; 为什么要使用 nfs? 如果userA上传文件通过负载均衡器上传到了web01,这个时候userB去下载file1又被负载均衡器分配到了web02 上面就找不到userA上传的资源了。 使用了共享存储nfs之后,userA上传的文件到nfs 阅读全文
posted @ 2020-07-12 11:24 Gshelldon 阅读(259) 评论(0) 推荐(0)
摘要: rsync介绍 rsync用来定时备份服务器中的文件或者目录,有三种工作模式,本地复制,使用系统用户认证,守护进程方式,开源高效。同步工具,把一台机器上的文件同步都另一台机器 。默认使用873端口 选项 -a #归档模式传输, 等于-tropgDl -v #详细模式输出, 打印速率, 文件数量等 - 阅读全文
posted @ 2020-07-12 11:19 Gshelldon 阅读(1337) 评论(0) 推荐(0)