Bamboo Nginx reverse proxy configuration

Lennart Weijl December 12, 2013

Hi there,

I'm trying to install a fresh Bamboo v5.2.2 installation using MariaDB 10.0.6-MariaDB-1~wheezy-log with the MySQL JDBC 5.1.26 connector.

The installation stops at the point of choosing the database, where I get an internal server error. Atlassian support told me about MariaDB not being supported plus the steps to use the unsupported database option (also see BSP-12238).

Not sure where the redirect error is, and atlassian support directed me to this community. I hope someone here can assist me to fix my issue.

On the internet there are several pages where nginx configurations can be found for Nginx to reverse proxy Atlassian Jira (one of them on this website how-to-configure-jira-to-work-properly-behing-a-proxy-nginx-with-both-http-and-https). This configuration seems similar to what Atlassian Bamboo needs, except it is not working for me.

While installing I'm getting a 500 internal server error with the following request information:

Request information:

    Request URL: http://ci.example.com/setup/setupDatabaseConnection.action
    Scheme: http
    Server: ci.example.com
    Port: 80
    URI: /setup/setupDatabaseConnection.action
    Context path:
    Servlet path: /setup/setupDatabaseConnection.action
    Path info:
    Query string: selectedDatabase=other?selectedDatabase=other

Looking at the request information the page is redirected to http, while that is redirected to https according to the nginx configuration below (which is the one I'm using).

server {
        listen 80;
        server_name ci.example.com;
        ## redirect http to https
        rewrite ^ https://$server_name$request_uri permanent;
}

server {
        listen   443 ssl; ## listen for ipv4; this line is default and implied
        access_log /var/log/nginx/ciexamplecom_access.log;
        error_log /var/log/nginx/ciexamplecom_error.log error;
        root /usr/share/nginx/www;
        index index.html index.htm index.php;
        server_name ci.example.com;

        ## ssl config
        ssl_certificate         ssl/apache.crt;
        ssl_certificate_key     ssl/apache.key;
        ssl_protocols           SSLv3 TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers             RC4:HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;
        keepalive_timeout       70;
        ssl_session_cache       shared:SSL:10m;
        ssl_session_timeout     10m;

        location / {
                proxy_pass              http://localhost:8085/;
                proxy_read_timeout      10800s;
                proxy_set_header        Host                    $http_host;
                proxy_set_header        X-Real-IP               $remote_addr;
                proxy_set_header        X-Forwarded-For         $proxy_add_x_forwarded_for;
        }
}

Many thanks upfront.

[edit]

Adding 'scheme="https"' and 'proxyPort="443"' to the end of the connector did the trick.

<Connector port="8085"

                   maxThreads="150"
                   minSpareThreads="25"
                   maxSpareThreads="75"
                   connectionTimeout="20000"

                   enableLookups="false"
                   maxHttpHeaderSize="8192"
                   protocol="HTTP/1.1"
                   useBodyEncodingForURI="true"
                   redirectPort="8443"
                   acceptCount="100"
                   disableUploadTimeout="true"
                   scheme="https"
                   proxyPort="443"/>

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Alexander Dobriakov June 27, 2016

'scheme="https"' and 'proxyPort="443"' must be added to server.xml.

TAGS
AUG Leaders

Atlassian Community Events