# Problem with slash in branch and reverse proxy

**URL:** <https://community.cloudogu.com/t/problem-with-slash-in-branch-and-reverse-proxy/273>\
**Category:** SCM-Manager Bug Reports\
**Created:** [October 19, 2021, 5:51am UTC](https://community.cloudogu.com/t/problem-with-slash-in-branch-and-reverse-proxy/273 "2021-10-19T05:51:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon36565761](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@anon36565761](https://community.cloudogu.com/u/anon36565761)\
**Post date:** [October 19, 2021, 5:51am UTC](https://community.cloudogu.com/t/problem-with-slash-in-branch-and-reverse-proxy/273/1 "2021-10-19T05:51:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pfeuffer](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/pfeuffer/32/72_2.png) [@pfeuffer](https://community.cloudogu.com/u/pfeuffer)\
**Post date:** [October 19, 2021, 10:03am UTC](https://community.cloudogu.com/t/problem-with-slash-in-branch-and-reverse-proxy/273/2 "2021-10-19T10:03:08Z")

</div>

Hi,  
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?  
Regards  
René

---

<div class="post-metadata">

**Author:** ![anon36565761](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@anon36565761](https://community.cloudogu.com/u/anon36565761)\
**Post date:** [October 19, 2021, 12:31pm UTC](https://community.cloudogu.com/t/problem-with-slash-in-branch-and-reverse-proxy/273/3 "2021-10-19T12:31:14Z")

</div>

Hi,

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.

```auto
# 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 aa.bb.xx6.0/255.255.255.0
# Require ip aa.cc.yy.0/255.255.255.0
# Require ip aa.cc.zz.0/255.255.255.0
</Location>

```

Thank you, best regards

---

<div class="post-metadata">

**Author:** ![anon36565761](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@anon36565761](https://community.cloudogu.com/u/anon36565761)\
**Post date:** [October 20, 2021, 6:09am UTC](https://community.cloudogu.com/t/problem-with-slash-in-branch-and-reverse-proxy/273/4 "2021-10-20T06:09:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pfeuffer](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/pfeuffer/32/72_2.png) [@pfeuffer](https://community.cloudogu.com/u/pfeuffer)\
**Post date:** [November 5, 2021, 7:54am UTC](https://community.cloudogu.com/t/problem-with-slash-in-branch-and-reverse-proxy/273/5 "2021-11-05T07:54:26Z")

</div>

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

Thanks for this hint!

---

<div class="post-metadata">

**Author:** ![christoph.loose](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/christoph.loose/32/1400_2.png) [@christoph.loose](https://community.cloudogu.com/u/christoph.loose)\
**Post date:** [July 5, 2022, 3:04pm UTC](https://community.cloudogu.com/t/problem-with-slash-in-branch-and-reverse-proxy/273/6 "2022-07-05T15:04:08Z")

</div>


