IIS 7 + Apache Tomcat 7 +
I have a deployed and working Tomcat-application available under
I would like to see the same content under
http://my_app.local (and NOT the default Tomcat-site [which you can see below]).
I set up
isapi_redirect.dll, so right now
my_app.local‘s content equals to
localhost:8080‘s, but it’s not enough, I would like to map
(I DO have
127.0.0.1 my_app.local in hosts file, so I can already open
my_app.local, BUT now it only shows the default Tomcat site (same as available under
Please read what I have already tried:
I have IIS 7 (7.5.7600.16385) and Apache Tomcat/7.0.22 installed.
- I deployed an application (let’s call it “
my_app“) in Tomcat,
which now can be reached at
fine. I added a new web site in IIS panel with the path of the
my_app, which looks like this: “
Files\Apache Software Foundation\Tomcat 7.0\webapps\my_app
- I binded the host name
- After that, I configured
isapi_redirect.dlllike this (or
- Now, when I open
http://my_app.local, I can see the default Tomcat
site (see below), which is the same as the content under
http://localhost:8080/!! (That’s the problem!!!)
- BUT under
http://my_app.localI would like to see the same content as
How can I do that? Thank you very much in advance!!
my config files:
- isapi_redirect.properties (I made a dir junction to c:\tomcat, so this also works 🙂 )
- rewrites.properties (empty)
I found this too: http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html
Case B: You need to hide path components for all requests going to the
application. Here’s the recipe for the case, where you want to hide
the first path component /myapp. More complex manipulations are left
as an exercise to the reader. First the solution for the case of
- Use mod_rewrite to add /myapp to all requests before forwarding to the backend:
- Use mod_headers to rewrite any HTTP redirects your application might return.
- Use mod_headers again, to rewrite the paths contained in any cookies, your application might set.
If you are using Microsoft IIS as a web server, the ISAPI plugin provides a way of doing the first step with a builtin feature. You
define a mapping file for simple prefix changes like this:
# Add a context prefix to all requests ... /=/myapp/ # ... or change some prefix ... /oldapp/=/myapp/
and then put the name of the file in the
the registry or your
isapi_redirect.propertiesfile. In your
uriworkermap.propertiesfile, you still need to map the URLs as they
are before rewriting! […]
There is no support for Steps 2 (rewriting redirect responses) or 3 (rewriting cookie paths).
I was surprised that it writes “There is no support for Steps 2 (rewriting redirect responses) or 3 (rewriting cookie paths).“, I don’t know if it’s still true, but then what? Am I stuck again?