上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 40 下一页
摘要: 1.两个节点都启动 #由于节点1的优先级高于节点2,所以VIP在节点1上面 [root@lb01 ~]# ip addr | grep 10.0.0.3 inet 10.0.0.3/32 scope global eth0 [root@lb02 ~]# ip addr | grep 10.0.0.3 阅读全文
posted @ 2020-09-11 16:38 六月OvO 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 1.环境准备 主机IP身份 web01 172.16.1.7 web03 172.16.1.9 nfs 172.16.1.31 db01 172.16.1.51 lb01 172.16.1.4 master lb02 172.16.1.5 backup 10.0.0.3 VIP 2.保证两台七层负载 阅读全文
posted @ 2020-09-11 16:26 六月OvO 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.什么是高可用 一般是指2台机器启动着完全相同的业务系统,当有一台机器down机了 另外一台服务器就能快速的接管,对于访问的用户是无感知的。 2.高可用使用的工具 1.硬件: F5 2.软件: keepalived 3.keepalived是如何实现高可用的 keepalived是基于VRRP协议 阅读全文
posted @ 2020-09-11 16:20 六月OvO 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1.跳转到网上 #error_page配置的是http这种的网络地址 [root@web01 conf.d]# cat error.conf server { listen 80; server_name linux.error.com; location / { root /code/error; 阅读全文
posted @ 2020-09-11 16:07 六月OvO 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 1.nginx上传文件大小限制配置语法 Syntax: client_max_body_size size; Default: client_max_body_size 1m; Context: http, server, location 2.nginx上传文件大小限制配置示例 #也可以放入htt 阅读全文
posted @ 2020-09-11 16:03 六月OvO 阅读(535) 评论(0) 推荐(0) 编辑
摘要: 1.root配置 [root@web01 /etc/nginx/conf.d]# vim root.conf server { listen 80; server_name linux.root.com; location /download { root /code; } } #使用root时,当 阅读全文
posted @ 2020-09-11 16:01 六月OvO 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 一台服务器配置多个网站,如果配置都写在nginx.conf主配置文件中,会导致nginx.conf主配置文件变得非常庞大而且可读性非常的差。那么后期的维护就变得麻烦。 假设现在希望快速的关闭一个站点,该怎么办? 1.如果是写在nginx.conf中,则需要手动注释,比较麻烦 2.如果是include 阅读全文
posted @ 2020-09-11 15:57 六月OvO 阅读(568) 评论(0) 推荐(0) 编辑
摘要: 1.禁止IP访问直接返回错误 [root@web01 /etc/nginx/conf.d]# vim a_ip.conf server { listen 80 default_server; server_name localhost; return 500; } 2.引流的方式跳转页面 [root 阅读全文
posted @ 2020-09-11 15:56 六月OvO 阅读(262) 评论(0) 推荐(0) 编辑
摘要: [root@nginx ~]# cat nginx.conf user www; worker_processes auto; worker_cpu_affinity auto; error_log /var/log/nginx/error.log warn; pid /run/nginx.pid; 阅读全文
posted @ 2020-09-11 15:50 六月OvO 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #盗链就是由我的网站向你的网站发起get获取资源的请求 #跨域访问由我的网站向你的网站发起http的链接请求 1)配置被跨域的网站 [root@web02 /etc/nginx/conf.d]# vim beikuayu.conf server { listen 80; server_name li 阅读全文
posted @ 2020-09-11 15:49 六月OvO 阅读(505) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 40 下一页