SCM Manager with Mercurial in Tomcat behind Apache reverse proxy

156 views
Skip to first unread message

Gintas Grigelionis

unread,
Oct 28, 2015, 4:41:30 PM10/28/15
to scmmanager
This is a continuation of an old issue that I described as

"scm/hg redirects to scm/api/rest/help/repository-root/hg.html that uses localhost:<port> in URLs"

Well, I thought I nailed it with proxyName and proxyPort in <Connector /> as described in 4. of http://tomcat.apache.org/tomcat-8.0-doc/proxy-howto.html,
but then I upped the ante by using HTTPS and terminating SSL in Apache. I changed proxyPort to 443, added scheme="https" and secure="true" and tried tp
set base-url to https://<proxyName>/scm, but then I saw the following in the output of "hg push"

remote: ERROR: scm-manager hooks are disabled, please check your configuration and the scm-manager log for details

whereas logs contain

[ActivityCacheWarmUp] WARN  sonia.scm.repository.HgHookManager - created url https://<proxyHost>/scm/hook/hg/ without request, in some cases this could cause problems
[http-apr-127.0.0.1-8080-exec-1] INFO  sonia.scm.repository.HgHookManager - use https://<proxyHost>/scm/hook/hg/ for mercurial hooks

It seems that Tomcat does some intern forwarding to scm/hook/hg that gets confused by proxying?
Reply all
Reply to author
Forward
0 new messages