I'm trying to setup a reverse proxy using IIS to proxy request on port 80 to a local virtual machine on port 8080. The rewriting rule was setup using IIS GUI "Reverse Proxy" rule. However it work very strangely:
If there is a file/folder in the web folder (physical path), then the reverse proxy work. Otherwise, it throw 404 error.
For example, for a request to "http://example.com/myfile", if there is a file name "myapp" in the web folder then it get rewritten into "http://example.com:8080/myfile" properly. On the other hand, if there is no file "myfile" locally, then I get 404 error. It is as if there is something that check existence of a local file (and throw 404) before URL rewrite rules are processed.
I try disable some handles, re-order modules, and none seems to work :(
Running IIS 7.5 on Windows Server 2008 R2