使用etcd+confd管理Nginx配置(2)

upstream www_test.com { server 192.168.1.2:443; server 192.168.4.2:443; } server { server_name test.com:443; ssl on ssl_certificate /home/waf/build/openresty/nginx/cert/client/client.crt; ssl_certificate_key /home/waf/build/openresty/nginx/cert/client/client.key; location / { proxy_pass http://www_test.com; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_redirect off; } }

与模板生成的保持一致。

4、参考资料

cond的github上文档介绍

https://github.com/kelseyhightower/confd/blob/master/docs/template-resources.md

confd和etcd实现配置管理及模板使用

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/fdde36abbe29da15ff0fe432629eca90.html