Tomcat application routed trough IIS URL Rewrite cannot reach subdirectory (Error code 500)

509 views Asked by At

This is my first time using IIS and it has become a big headache. The objective is to run a web application trough an IIS on a windows 2012 server. The application is hosted on tomcat 8.5.

The application runs perfectly on 'localhost:8000/application', but then an issue occur when trying to do the URL rewrite to 'application.domain.com'. The URL correctly accesses the needed javascript files and styles the page correctly, but error code 500() is returned on a call to 'application.domain.com/subdirectory'. Unfortunately error 500 just implies some server error has occurred. The subdirectory is used to get data to the application and contain HTTP GET and HTTP POST methods.

My current implementation of the IIS:

I crated a new site 'application'. This site has an inbound and an outbound URL Rewrite reverse proxy rule. Inbound rule

Outbound rule

I am suspecting that there could be issues with the RegEx pattern, but i am not sure.

I am aware that there are some implications routing tomcat trough IIS and i have attempted to solve that with Application Request Routing(ARR), but without luck. I set up the ARR with a tomcat server farm according to this guide but ended up with error 502.2 - "Bad Gateway" instead.

This is the first time i have to mess with these things, so it's likely I got it all wrong and there is a much simpler solution. Thanks in advance.

0

There are 0 answers