Http validation has various limitations depending on your configuration and your scenario is one of them.
While there will definitely be a clever way to get http validation working, the easiest solution is to use DNS validation instead of http validation.
Either use a plugin to script updates to your DNS, your own script, or use an acme-dns service.