Enable both http and https parallely

sarath182 February 4, 2018

Hi team,

We have Bitbucket server hosted in our environment which now only supports http.

As we are going for more secured way, we are enabling https in bitbucket.

And also we don't want to remove http all of a sudden and hence we wanted both http and https running parallely.

When I enabled HTTPS alone, it works and vice-versa.

But when I try to have both running parallely, I'm facing an issue like it either gets redirected to http and vice-versa after first login.

Please let know if its possible to have  both http and https enabled parallely.

If yes , how it could be achieved ?

Would be thankful for quick support.

 

2 answers

1 vote
Abdulkarim Itani July 1, 2019

Append the below lines to a file named Bitbucket.properties, which can be found in the following path

<bitbucket home>/shared/bitbucket.properties

to the following:

BITBUCKET.PROPERTIES

##FOR HTTPS
server.port=8443
server.ssl.enabled=true
server.ssl.key-store=/path/to/keystore/bitbucket.jks
server.ssl.key-store-password=<password value>
server.ssl.key-password=<password value>

##FOR HTTP

server.additional-connector.1.port=7990

1 vote
Koen Gillard _KoGi_ February 4, 2018

Hi

You can configure an extra http port without any problem.

We do this as well to enable application links using a non-proxy http port.

sarath182 February 5, 2018

Hi Gillard,

Thanks for your quick response.

But could you please elaborate on how this could be achieved ?

We need to have bitbucket enabled on both 7990 and 8443 port.

Koen Gillard
Contributor
February 7, 2018

Hi

Please find an example of our config:

<Connector port="8080" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true" bindOnInit="false" proxyName="xxx.yyy.com" proxyPort="port" scheme="https" />

<Connector port="8081" connectionTimeout="20000" maxThreads="200" minSpareThreads="10" enableLookups="false" acceptCount="10" URIEncoding="UTF-8" />

<Connector port="8443" maxHttpHeaderSize="8192" SSLEnabled="true" maxThreads="150" minSpareThreads="25" enableLookups="false" disableUploadTimeout="true" useBodyEncodingForURI="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keyAlias="alias" keystoreFile="store.jks" keystorePass="pwd" keystoreType="type"/>

Port 8080 will redirect to the https port 8443, but 8081 will be accessible using http. 

bitbucketuat
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2019

I also want this answer, I am using Linux version, need edit bitbucket.properties, but try many time only either can listen 7990 *HTTP) or 8443 (HTTPS) only, anyone know how to config to listen http & https?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events