I've seen plenty of google hits for converting Apache to nginx and Apache to OLS but very few guides for converting nginx configs to OLS. With nginx I have a port 80 wildcard rule for .well-known to change only the doc root path to a common primary host path so I can get/renew Letsencrypt certificates even if the virtual host has a non-local IP, like on Cloudflare. I don't want a full redirect to another locally hosted URL. I want the incoming port 80 lookup from Letsencrypt to some.domain.tld to remain as such but that the doc root for some.domain.tld gets temporarily changed to where the /home/u/primaryhost.org/var/www/.well-known directory actually exists only if there is a URI path lookup of .well-known. All other port 80 traffic should get rewritten to port 443 using the real doc root of ie; /home/u/some.domain.tld/var/www. Any suggestions?
location ^~ /.well-known { root /home/u/primaryhost.org/var/www; }
location ^~ /.well-known { root /home/u/primaryhost.org/var/www; }