Hosting dynamic pages with discourse

As i red the question is can a directory, as part of an url, be outside Discourse or Docker (docker is very difficult consept to understand for me) and therefor use PHP.

Or — can, for example, a reverse proxy redirect calls so that directory part is taken care by something like LAMP, and everything else goes to Discourse. Then it is only matter of two backends, right?

Actually I’m quite sure, in theory anyway, that could be made using Varnish. What I don’t know, among really many things, what kind of conflict will happen if/when that url is called inside Discourse. Or is it even then only matter of redirects.