If you run your Bitbucket Server/Data Center behind a proxy then you need to provide additional configuration to make your REST API work and connect a Bitbucket mirror correctly.
You need to add to the BITBUCKET_HOME/shared/bitbucket.properties the following lines:
server.secure=true server.scheme=https server.proxy-port=443 (ssl port) server.redirect-port=443 (ssl port) server.proxy-name=your bitbucket domain
If you already have the server.port parameter in your bitbucket.properties then do not change it. Leave it as it is. If you configure a mirror then you should add the same configuration to your Bitbucket mirror instance.