为 bitbucket 设置 apache 子域反向代理

Set apache subdomain reverse proxy for bitbucket

我阅读了一些文档 "how to make it possible" 像这样

confluence.atlassian.com/kb/proxying-atlassian-server-applications-with-apache-http-server-mod_proxy_http-806032611.html

httpd.apache.org/docs/2.4/vhosts/examples.html

我暂时没有尝试使用 https。首先我想要一个小小的成功,通过我的子域访问 bitbucket...

运行:

Ubuntu 16.04.2 LTS

比特桶 5.0.0

Apache/2.4.18

/var/atlassian/application-data/bitbucket/shared/bitbucket.属性:

server.port=7990
server.secure=false
server.scheme=http
server.proxy-port=80
server.redirect-port=80
server.proxy-name=mysub.mydomain.mytld

/etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
        ServerName mysub.mydomain.mytld

        ProxyRequests Off
        ProxyVia Off


          ProxyPass "/" "http://mydomain.mytld:7990/"
          ProxyPassReverse "/" "http://mydomain.mytld:7990/"

</VirtualHost>

bitbucket base url(bitbucket 设置管理)

 http://mysub.mydomain.mytld

重启命令

/etc/init.d/apache2 restart

within /opt/atlassian/bitbucket/5.0.0/bin/
./stop-bitbucket.sh
./start-bitbucket.sh

最终问题出在虚拟主机配置错误

<VirtualHost subdomain.domain.tld:80> 

ProxyPass "/" "http://localhost:7990/"

ProxyPassReverse "/" "http://localhost:7990/"

本地主机...而不是 public 域