BitBucket behind an Amazon ELB


I have installed Bitbucket in the Amazon cloud on a Windows EC2 instance. I followed the instructions for configuriing the server.xml for usage with the Apache reverse proxy, but instead of Apache, I am trying to use an Amazon ELB (Elastic Load Balancer). From what I have read, this should be possible.

The change on the Bitbucket side involves adding the lines:

proxyName="<my ELB URL>"

proxyPort="80" />

to server.xml

and adjusting the value of Base URL within the application. I made this:


http://<my ELB URL>



The ELB is configured to pass requests on port 80 through to the Bitbucket server on port 7990 -it's standard operating port. When I remove the proxy lines, the Bitbucket server works without a hitch on localhost.

I don't get the requests routing through (the browser just hangs and times out). I also have trouble setting the health check on the ELB to be TCP on port 7990. However, when I set it to a static page beneath IIS on port 80, it detects and active system. It just seems that the BitBuckter server is not redirecting back to the ELB.

Any suggestions?





1 answer

0 votes
Jeff Thomas Atlassian Team Jan 14, 2016

Hi Stan,

I have a couple suggestions to checkout as the issue could lie in a few places. I was able to get ELB working with an Windows EC2 instance just now.

EC2 Security Group

Check the security group on the EC2 instance and make sure that it allows inbound connections on port 7990 for the ELB. As a quick test, you can set the allowed source IP address to be so that all connections are accepted and then narrow down the scope after.

ELB Security Group

Look at the security group for the load balancer and verify that inbound connections are allowed on port 80

Windows Firewall

Verify that there is an inbound rule in the Windows Firewall that allows TCP requests on port 7990.

Health Check

This is likely not the cause of the issue, but the ping path for the health check should be /status, that is a special endpoint that can be used to determine if the instance is running and in a healthy state.

Let me know how that goes!


Jeff, Thanks for your input. I discovered it yesterday. It was Windows firewall. Regards, Stan

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

678 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you