nginx1.14.0版本location路径,多级文件目录配置,root与alias的配置区别
摘要:1、多级目录配置 多级目录是指像/html/mypage 等等配置: 2、root和alias的区别 感谢这位老兄: https://www.cnblogs.com/my_life/articles/7070805.html 《nginx配置 location root》 alias 指定的目录是准
阅读全文
posted @
2019-05-16 23:32
梦幻朵颜
阅读(11016)
推荐(1) 编辑
nginx1.14.0版本高可用——keepalived双机热备
摘要:nginx不支持主从,所以我们需要使用keepalive支持高可用。 keepalived重要知识点 在局域网内,每个主机上各安装一个keepalived,注意关闭防火墙firewalld,然后设定一个VIP(虚拟IP),主keepalived会获得授权在自己的主机上设置一个虚拟IP提供给应用层使用
阅读全文
posted @
2019-03-22 10:01
梦幻朵颜
阅读(509)
推荐(0) 编辑
nginx1.14.0版本https加密配置
摘要:修改host文件,为最后访问域名准备 C:\Windows\System32\drivers\etc host文件目录192.168.10.140 www.joyce.com 在最后添加这个自定义域名 https公钥和私钥定义 服务端:公钥、私钥 服务器持有一对公钥和私钥,并且把自己的公钥发给客户端
阅读全文
posted @
2019-03-20 11:25
梦幻朵颜
阅读(2683)
推荐(0) 编辑
nginx1.14.0版本负载均衡upstream配置
摘要:第一步:server配置,指向负载均衡upstream1 server { listen 80; server_name www.xxx.com; location / { proxy_pass http://upstream1 使用哪个负载均衡 proxy_set_header Host $Hos
阅读全文
posted @
2019-03-19 15:38
梦幻朵颜
阅读(461)
推荐(0) 编辑
nginx1.14.0版本location路径proxy_pass配置四种方式
摘要:假设下面四种情况分别用 http://192.168.1.1/proxy/test.html 进行访问。 第一种:location /proxy/ { proxy_pass http:// 127.0.0.1/; 一般情况下不要在最后加上/,因为会去掉请求URL一部分。}代理到URL:http://
阅读全文
posted @
2019-03-19 15:09
梦幻朵颜
阅读(708)
推荐(0) 编辑
nginx1.14.0下载、安装、启动
摘要:nginx1.14.0下载及安装 wget http://nginx.org/download/nginx-1.14.0.tar.gztar -zxvf nginx-1.14.0.tar.gzcd nginx-1.14.0 下面的configure命令选择其中一种即可: ./configure --
阅读全文
posted @
2019-03-16 22:08
梦幻朵颜
阅读(5481)
推荐(0) 编辑
nginx1.14.0版本server、location、rewrite配置
摘要:server配置demo 在192.168.10.140(centos7)上修改: /home/program/nginx/conf/nginx.conf 添加一个server cd /home/program/nginx/html mkdir domain //应用的静态资源文件所在路径 cd d
阅读全文
posted @
2019-03-16 22:05
梦幻朵颜
阅读(1234)
推荐(0) 编辑
nginx1.14.0日志打印
摘要:nginx日志打印 http属性log_format来设置日志格式 ,参考 https://www.jb51.net/article/52573.htm 《nginx日志配置指令详解》 log_format myformat '$remote_addr - $remote_user [$time_l
阅读全文
posted @
2019-03-16 22:03
梦幻朵颜
阅读(1192)
推荐(0) 编辑