Problem with slash in branch and reverse proxy

We have the SCM manager behind an Apache 2.4 on a Windows Server 2016. We have the configuration exactly as described in the SCM manager documentation (reverse proxy).
It works quite well so far, except when you select a branch in a repository that contains a slash “/”. Then we get an error message:

Error: server returned status code 404

Branches without a slash work fine.
If we access the SCM-Manager on the server via “http: // localhost:8080 / scm” and select a branch with a slash, then it works. So I suspect that the problem is with the reverse proxy configuration.
Maybe someone knows the problem and can give us a tip on how to fix it?

this should be handled with the directive AllowEncodedSlashes NoDecode. When I remove this in my own installation, I get the error you mention. Can you make sure this is set correctly?


I’m sure that the directive is set correctly. Below you will find the SCM part from the Apache configuration file. It is almost the same as described in the documentation. I only adjusted the location part to the new Apache 2.4 directives.
I switched the directive “AllowEncodedSlashes” on and off, but without success. To me it looks like it makes no difference what the value of the directive is.

# SCM-Manager
# avoid encoding of slashes
AllowEncodedSlashes NoDecode

# if https is used, make sure X-Forwarded-Proto is send
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}

# scm-manager is running on localhost at port 8080
ProxyPass           /scm http://localhost:8080/scm nocanon
ProxyPassReverse    /scm http://localhost:8080/scm

<Location /scm>
    Require all granted
#    Require ip
#    Require ip
#    Require ip

Thank you, best regards

I found the solution.
The directive AllowEncodedSlashes must be in the VirtualHost section in the Apache configuration, then it works.


We’ve updated the documentation (which will be updated with the next release).

Thanks for this hint!