大网数据广告活动
服务器运维问答

Changing Atlassian Bitbucket path

· 52CE 我爱测

My setup: I'm running both Jira and Bitbucket [5.12.0] on my Ubuntu 18.04 server. I've tried to change the urls for both apps to be: 192.168.1.77:8080/jira and 192.168.1.77:7990/bitbucket respectively. I've got an Apache webserve…

问题原文

原帖链接 · NEW2WEB · CC BY-SA 4.0

My setup: I'm running both Jira and Bitbucket [5.12.0] on my Ubuntu 18.04 server. I've tried to change the urls for both apps to be: 192.168.1.77:8080/jira and 192.168.1.77:7990/bitbucket respectively.

I've got an Apache webserver setup on another machine that redirects traffic to these machines (using proxypass and proxypassreverse) as such:

 ProxyPassReverse /jira http://192.168.1.77:8080/jira
 ProxyPassReverse /bitbucket http://192.168.1.77:7990/bitbucket
 ProxyPass /jira http://192.168.1.77:8080/jira
 ProxyPass /bitbucket http://192.168.1.77:7990/bitbucket

For Jira, I've updated server.xml (docBase path property) and set it to /jira

As a result, myserver.com/jira now works!

However I can't get my Bitbucket instance to launch under 192.168.1.77:7990/bitbucket. Instead, it is only available under 192.168.1.77:7990

I have updated the 'Base URL' under 'Server Settings' to www.myserver.com/bitbucket. The redirection isn't the problem as it is correctly redirected to 192.168.1.77:7990/bitbucket - but I get an "oops, you've found a dead link" from bitbucket.

I have read a ton of documents and every site says that just updating Base URL should work - so why does it not work for me?

Update: When I try to change ProxyPass and ProxyPassReverse for Bitbucket to the following:

ProxyPassReverse /bitbucket http://192.168.1.77:7990
ProxyPass /bitbucket http://192.168.1.77:7990

It forwards fine to the Bitbucket login page. However, it appears without images and formatting - like folder permissions are incorrect or something.

已采纳解答

原帖链接 · NEW2WEB · CC BY-SA 4.0

I finally found what I was missing.

For some reason, the server.context-path was not being added or set in the bitbucket.properties file - even when I was changing it through the Base Path property under Server Settings in the UI.

All I had in that file was the jdbc driver details. Here is the link I followed: Moving Bitbucket Server to a different context path

Steps I took:

  1. Stopped Bitbucket
  2. Edited .../shared/bitbucket.properties to include line: `server.context-path=/bitbucket
  3. Restarted Bitbucket

And it now works!

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-08-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。