We have a Java application which will be installed into tomcat6. Our security team will not allow Tomcat to be public facing so I am in a postion where I have to recieve https traffic to IIS 7.5 and use a URL rewrite to direct traffic to Tomcat6 (using URL rewrite module 2). Both IIS 7.5 and Tomcat6 are on the same server.

My questions are as follows :

  1. Can I redirect https traffic from IIS7.5 to Tomcat6 ??

  2. If so how do I keep it encrypted ??? (I already have ssl setup between the external network router and the IIS7.5 site)

  3. Am I correct in saying that traffic recieved from IIS7.5 to Tomcat will not be returned back to IIS7.5 and that it will be sent back to the client address and need a https connection to the network device connecting it to the public ??

  4. As per no. 3 when the java application responds to the https traffic I believe it will respond directly back to the client which would be the external network device - how do I setup ssl between tomcat and the network device as I believe this would be a new connection ????

Any help will be greatly appreciated

Cheers Jeff

migrated from stackoverflow.com Feb 21 '12 at 2:49

This question came from our site for professional and enthusiast programmers.


Thanks for the reply, here are my responses to your feedback.

1) Yep, I am redirecting traffic via port 8080 to tomcat. Tomcat is on the same server. I have installed the Application Request Routing Module for IIS and enabled the proxy setting. I then used a URL rewrite to perform this so all is working now. Thanks for the info.

2) I have installed tomcat on the same server as IIS 7.5 so have decided that I do not need to try and pass SSL traffic from IIS 7.5 to tomcat as it is all internal to the server.

3) As I am using the proxy component of Application Request Routing traffic should be sent via IIS 7.5.

4) I believe it should respond back to the client from tomcat via IIS7.5 as it is the proxy.

Thanks again for your help.

Much appreciated.

Cheers Jeff

  • good to know your comments about it, i hope you find it useful, dont forget to vote. – GersonO Feb 22 '12 at 7:27

1) Redirections can be made between servers despite their base technology, with this i mean that you can easily configure a redirection route on IIS , and make it point to ANY url despite if this url is on java or php.

Considering that it is on the same server you must be carefull on the urls, and place the proper port your target Webserver is pointing, i guess that for tomcat you will use the 8080.

2) Let me see if I understand well: You will get incomming connections on port 443, and then you will redirect this code, to the port 8080 (My assumption) in Tomcat. in that case you should enable ssl on that specific port, or to make all your redirections to the given ssl port configured for tomcat.

3) If you do the correct mapping of all the required urls on IIS7.5 to Tomcat there is no reason why the browser should redirect to the previous webserver.

4) In theory the reply should be returned directly to the client;

By the way, have an example of something similar you are doing.

This was an asp app running on IIS and redirecting all the links to a new site running apache+php.

RewriteRule text1/text2.aspx http://newserver/text1/text2 [L,R=301]

I hope you find this useful

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.