How to use golang lego let's encrypt client behind nginx?
问题 I'd like to setup Let's Encrypt certificate to live server with nginx with lego client written in Go https://github.com/xenolf/lego/ What I'll to do with nginx config to get certificate? 回答1: You need to add in :80 and :443 virtual servers following location: # http and https nginx servers location /.well-known/acme-challenge/ { proxy_set_header Host $host; proxy_pass http://127.0.0.1:4000$request_uri; } And run lego binary: ./lego.amd64 --http 127.0.0.1:4000 --email="your@address.tld" -