I am thinking autodiscover… I might create a PHP index on my web server, giving it no host-header name, but leaving it only to be hosted on IP, so, for example, http://12.34.56.78/autodiscover would display this page (actually, would generate XML on POST/GET request).
I wouldn’t use HTTP or access the page by IP. Both of those are just barbaric.
With the right logic, you can certainly use the exact same file to fulfill autodiscover queries for multiple domains. I have done it.
If you wanted to server it from autodiscover.example.com you would need to configure vhosts accordingly. It shouldn’t prove that difficult. The path https://example.com/autodiscover/autodiscover.xml is actually checked before the subdomain, though, so you don’t have to have an autodiscover.example.com if you don’t want…
Even if you are trying to figure out how to write with Workers or host it on Cloudflare, most of the discussion around how to do it is out of scope for the Cloudflare Community.
Whatever you wind up doing, please don’t use HTTP or direct IP connections. The world deserves better than that. Your clients deserve better than that. You deserve better than that.