Bamboo via Apache with SSL
Asked by Logan Rhodehamel:

I can't reply to this old forum discussing this topic: <http://forums.atlassian.com/thread.jspa?threadID=45075>

This is less of a question and more of a contribution to the community of how I did it.

My web server is Apache and I only wanted to provide access to three services (Bamboo, Fisheye, and Jira) all through the same secure port, using different web contexts

* myserver:443/bamboo
* myserver:443/jira
* myserver:443/fisheye

Jira and fisheye were relatively easy to set up because they use the tomcat container. Using mod proxy apache can communicate with these services over plain HTTP, and proxy port / proxy host settings take care of the rest.

Bamboo I had much trouble with. The old forum thread seemed overly complex. And one of the solutions wouldn't work for me because I do not expose Bamboo on a non-secure port.

In the end what solved it was to reconfigure Bamboo so that it loaded from the jetty.xml file. Then I reconfigured the server to publish on an SSL connector. Then I used Apache's SSL proxy to communicate with Bamboo over SSL behind the scenes as well. This works because then Bamboo is expecting to work with the https scheme and redirects or generated links don't keep switching back to http://.


Answers:
author: Logan Rhodehamel
body: The jetty.xml I am using is below. I am using a self-signed certificate created with keytool. I am not certain if it is necessary to serve bamboo on the unsecured port (8085) but it serves on ssl over 8086. Neither of these ports is accessible externally via my firewall. Apache connects to the service on the 8086 port.

```
&lt;?xml version="1.0"?&gt;&lt;!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"&gt;&lt;Configure id="Server" class="org.eclipse.jetty.server.Server"&gt;    &lt;Call name="addConnector"&gt;          &lt;Arg&gt;              &lt;New class="org.eclipse.jetty.server.nio.SelectChannelConnector"&gt;                  &lt;Set name="host"&gt;&lt;Property name="jetty.host" /&gt;&lt;/Set&gt;                  &lt;Set name="port"&gt;&lt;Property name="jetty.port" default="8085"/&gt;&lt;/Set&gt;                  &lt;Set name="confidentialPort"&gt;&lt;SystemProperty name="jetty.ssl.port" default="8086"/&gt;&lt;/Set&gt;                &lt;Set name="IntegralPort"&gt;8086&lt;/Set&gt;            &lt;/New&gt;          &lt;/Arg&gt;      &lt;/Call&gt;       &lt;Call name="addConnector"&gt;        &lt;Arg&gt;            &lt;New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector"&gt;                &lt;Set name="host"&gt;&lt;Property name="jetty.host" /&gt;&lt;/Set&gt;                &lt;Set name="port"&gt;&lt;Property name="jetty.port" default="8086"/&gt;&lt;/Set&gt;                &lt;Set name="Keystore"&gt;&lt;SystemProperty name="jetty.home" default="."/&gt;/keystore&lt;/Set&gt;                &lt;Set name="Password"&gt;password&lt;/Set&gt;                &lt;Set name="KeyPassword"&gt;password&lt;/Set&gt;            &lt;/New&gt;        &lt;/Arg&gt;    &lt;/Call&gt;         &lt;Call name="setHandler"&gt;        &lt;Arg&gt;            &lt;New class="org.eclipse.jetty.webapp.WebAppContext"&gt;                &lt;Arg name="webApp"&gt;                    &lt;SystemProperty name="bamboo.webapp" default="../webapp"/&gt;                &lt;/Arg&gt;                &lt;Arg name="contextPath"&gt;/bamboo&lt;/Arg&gt;                &lt;Set name="defaultsDescriptor"&gt;webdefault.xml&lt;/Set&gt;                &lt;Get name="sessionHandler"&gt;                    &lt;Set name="sessionManager"&gt;                        &lt;New class="org.eclipse.jetty.server.session.HashSessionManager"&gt;                            &lt;Set name="httpOnly"&gt;true&lt;/Set&gt;        &lt;!-- use M$ http only cookies? --&gt;                        &lt;/New&gt;                    &lt;/Set&gt;                &lt;/Get&gt;            &lt;/New&gt;        &lt;/Arg&gt;    &lt;/Call&gt;&lt;/Configure&gt;
```

comments: author: Victor Crudu
body: Doesn't work for me


Tags: apache

ssl