How to setup Crucible with AJP connection to IIS7 (I get 502 - Web server received an invalid response while acting as a gateway or proxy server.)
Asked by Randy Hentz:

I have setup Jira and confluence using the AJP connector for IIS, but Crucible gives me a 502 - (Web server received an invalid response while acting as a gateway or proxy server.) I found some documentation on setting up crucible with other webservers, but that doesn't work either. Not really sure how to troubleshoot this one.


Answers:
author: Adil Fulara
body: Felipe,

I have attempted to do what you said after initialization of crucible on localhost:8060.

After setting the properties for the proxy and restarting crucible, i cant access it through the web. i do see the port 8010 ( configured for crucible since 8009 is in use by jira ) but the redirect doesnt seem to be happening.

Any help would be appreciated.

Thank you,

Adil


author: Felipe Kraemer
body: Hi Randy,

Unfortunately we don't have any documentation on how to integrate FishEye / Crucible with IIS.

We have a document explaining how to integrate JIRA with IIS. For FishEye, the process is basically the same on the IIS side of things:

* <http://confluence.atlassian.com/display/JIRA/Integrating+JIRA+with+IIS>

So firstly, for steps 1 \& 2 where we refer to JIRA, the process on the Fisheye side of things is rather similar. We just need to set the appropriate context path and proxy settings and create an AJP port. So navigate to FishEye Administration \>\> Server Settings \>\> Web Server and enter the appropriate values:

* <http://confluence.atlassian.com/display/FISHEYE/Configuring+the+FishEye+Web+Server>

![](../../upfiles/serversettings.jpg)

You can see here I've opened up the AJP port on port 8009 (but it can be anything).

It's imperative you correctly set the proxy host / port and site URL to match that of the public address as in my example above.

Once we have that done, basically follow the instructions under step 3, the only difference is where it mentions to create worker threads and virtual directories for JIRA, I changed it to FishEye.

![](../../upfiles/iis.jpg)

Also when configuring the worker threads we set up a separate worker for FishEye and point it at the AJP port we will opened on FishEye - port 8009 in my case.

So my *workers.properties.minimal* looks like:

*# workers.properties.minimal -*

*worker.list=jira,fisheye*

*#fisheye*

*worker.fisheye.type=ajp13*

*worker.fisheye.host=localhost*

*worker.fisheye.port=8009*

*#jira...*

*worker.jira.type=ajp13*

*worker.jira.host=localhost*

*worker.jira.port=8010*

And my *uriworkermap.properties* just uses the FishEye virtual directory I set up earlier:

*# uriworkermap.properties - IIS*

*/fisheye/\*=fisheye*

*/jira/\*=jira*

The *isapi_redirect.properties* is basically what is linked on the JIRA documentation.

You may also need to configure *isapi_redirect.dll* and the necessary properties files with Jetty. I found documentation here which has instructions on how to configure Jetty with IIS Virtual Directories:

* <http://groups.google.com/group/openbd/browse_thread/thread/c048dd1323653d1e>

Please let us know any news.

Cheers,  
Felipe Kraemer

comments: author: Adil Fulara
body: Felipe,

I have attempted to do what you said after initialization of crucible on localhost:8060.

After setting the properties for the proxy and restarting crucible, i cant access it through the web. i do see the port 8010 listening ( configured for crucible since 8009 is in use by jira ) but the redirect doesnt seem to be happening. crucible does pick up the changes for the proxy but somehow i think iis is not doing the redirect.

Any help would be appreciated.

Thank you,

Adil