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