Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up Apache as a reverse proxy

Gayam Reddy November 8, 2018

Hi,

After I setup the Apache as a reverse proxy, we are able to browse the bitbucket on the browser but unable to clone or push the code to bitbucket from command line.

Have added the following in the bitbucket.properties

server.secure=true
server.scheme=https
server.proxy-port=443
server.proxy-name=bitbucket.mydomain.com

 

Apache Configs:

<VirtualHost *:443 >
ServerName bitbucket.mydomain.com

SSLEngine on
SSLProtocol -all +TLSv1

# Disable week ciphers:

SSLCipherSuite HIGH:!MEDIUM:!aNULL:!MD5:!RC4
SSLCertificateFile /etc/httpd/certs/bb.crt
SSLCertificateKeyFile /etc/httpd/certs/bb.key
SSLCertificateChainFile /etc/httpd/certs/SecureServerCA.crt
SSLCACertificateFile /etc/httpd/certs/TrustedExternalCARoot.crt

ProxyErrorOverride On
ProxyRequests Off
ProxyVia Off

<Proxy *>
Require all granted
</Proxy>

ProxyPass / http://servername:7990/
ProxyPassReverse / http://servername:7990/

</VirtualHost>

<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>

 

Updated the base URL on the bitbucket server. 

Am I missing anything?

3 answers

0 votes
Gayam Reddy November 15, 2018

Was anyone successful in setting up a proxy before BitBucket 5.0 and above? I can view the projects on the browser, but just can't pull or push to the repository.

Gayam Reddy November 15, 2018

I was able to setup Jira and Confluence behind the Apache, its just the bitbucket that has the problems.

0 votes
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 9, 2018

Hi Gayam,


What happens when you try to clone or push? Are you using HTTP to clone/push or SSH?

Cheers,

Christian

Premier Support Engineer

Atlassian

Gayam Reddy November 9, 2018

We are using http to clone and push and all I see is the 502 error. The apache gives an

"error reading status line from remote server servername:7990"

Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 9, 2018

502 would indicate that there is an error in Bitbucket. Anything interesting in the Bitbucket log?

Gayam Reddy November 12, 2018

No, I couldn't find any errors on the bitbucket server. 

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2018

One setting you're missing in the Bitbucket *server.port=7990*. If that does not work, you need to check the Apache ssl error or the error log.

Gayam Reddy November 9, 2018

from the documentation since the default port is 7990 we don't need to mention this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events