https://www.cnblogs.com/mrluo735/p/6322719.html
(官方文档)
一.环境准备
1.下载disconf源码https://github.com/knightliao/disconf
2.下载nginx1.10.2(windows版)
3.安装tomcat https://tomcat.apache.org/download-70.cgi
4.安装redis https://www.cnblogs.com/M-LittleBird/p/5902850.html(windows安装指导) https://github.com/MicrosoftArchive/redis/tags(安装包)
5.安装好zookeeper (windows安装指导)
二、组件配置
1、tomcat配置
idea的tomcat配置
2、nginx配置(nginx-1.12.2\conf\nginx.conf)看好插入的层级管理,不要插入错了
upstream disconf { server 127.0.0.1:9999; #代理tomcat,动态请求转发至后端tomcat程序,这里和tomcat的端口号配置相同 } server { listen 8089; #这里是nginx的监听端口 server_name localhost; location / { root E:\project\disconf\disconf\disconf-web\html; #这里指向项目中disconf-web子模块中html位置 if ($query_string) { expires max; } } location ~ ^/(api|export) { proxy_pass_header Server; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_pass :9999; #tomcat端口 } location = /favicon.ico { log_not_found off; access_log off; } }