【发布时间】:2017-10-04 13:56:00
【问题描述】:
我阅读了几篇类似“如何使之成为可能”的文档
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.properties:
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 基本网址(bitbucket 设置管理)
http://mysub.mydomain.mytld
重启命令
/etc/init.d/apache2 restart
within /opt/atlassian/bitbucket/5.0.0/bin/
./stop-bitbucket.sh
./start-bitbucket.sh
- 当我调用http://mydomain:mytld:7990/ 时,使用默认bitbucket.properties bitbucket 有效
-
使用我的自定义 bitbucket.properties,当我调用 http://mysub.mydomain.mytld/ 时显示 500 内部错误。在 apache 日志中:
“没有协议处理程序对 URL / 有效。如果您使用的是 mod_proxy 的 DSO 版本,请确保代理子模块包含在使用 LoadModule 的配置中。”
【问题讨论】:
-
仅供参考,如果您的端口 7990 上的连接器正在接收来自反向代理的流量,那么您不应该定义
server.redirect-port=80。当您有两个连接器并希望将流量从一个重定向到另一个(例如,从 HTTP 到 HTTPS)时,通常使用重定向端口。在这种情况下,您的反向代理正在将流量发送到端口 7990 上的连接器,因此它不应重定向到任何地方。话虽如此,在您的示例中重定向端口将处于非活动状态,因为它与其他配置齐头并进 - 为了清楚起见,我只是建议将其删除。
标签: apache subdomain bitbucket reverse-proxy