I don't know what I did wrong previously, but I re-attempted it and managed to get it to work with the same thought processing in mind. I created a backend that will be my local web server:
[image: C3hzf.png]
My http/https offloader (front-end) defines a path rule and redirects to such backend if we have an ACME challenge:
[image: HEQWW.png]
[image: XpqGP.png]
[image: ulstK.png]
Maybe it was the ordering of the actions, maybe it was the naming. I was pretty confident that I tested my previous setup with 127.0.0.1 as well, but this seems to work and I don't know why it did not work previously.
Now it was very easy to confirm the configuration is right when using postman. Say you have the domain example.org, you should do a GET request to two different URLs to validate their response:
http://example.org/foobar: Should return a Location header with the https version of the URL, so confirming the offloader works
http://example.org/.well-known/acme-challenge/foobar: Should timeout! It must not return an error immediately, or the configuration is wrong. If the configuration is right, it will try to talk to the standalone HTTP server that only runs during the ACME challenge, so it will timeout with 503 Service Unavailable after 60 seconds or so, which means it will succeed if the standalone HTTP server is running.
With this setup the "Standalone HTTP server" method will work.