Skip to content

Commit

Permalink
Specify using AllowEncodedSlashes and nocanon for httpd (#7540)
Browse files Browse the repository at this point in the history
When using wiki page names that include a slash
behind a Apache HTTPD reverse proxy,
AllowEncodedSlashes NoDecode
and appending nocanon to the ProxyPass
directive is required. This commit adds that
information to the documentation.

Signed-off-by: Gary Kim <gary@garykim.dev>
  • Loading branch information
gary-kim authored and lafriks committed Jul 20, 2019
1 parent 61ad048 commit cc384d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/content/doc/usage/reverse-proxies.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ If you want Apache HTTPD to serve your Gitea instance, you can add the following
...
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://localhost:3000/
AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:3000/ nocanon
ProxyPassReverse / http://localhost:3000/
</VirtualHost>
```
Expand All @@ -70,9 +71,10 @@ In case you already have a site, and you want Gitea to share the domain name, yo
<Proxy *>
Order allow,deny
Allow from all
AllowEncodedSlashes NoDecode
</Proxy>
ProxyPass /git http://localhost:3000 # Note: no trailing slash after either /git or port
ProxyPass /git http://localhost:3000 nocanon # Note: no trailing slash after either /git or port
ProxyPassReverse /git http://localhost:3000 # Note: no trailing slash after either /git or port
</VirtualHost>
```
Expand Down
6 changes: 4 additions & 2 deletions docs/content/doc/usage/reverse-proxies.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ server {
...
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://localhost:3000/
AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:3000/ nocanon
ProxyPassReverse / http://localhost:3000/
</VirtualHost>
```
Expand All @@ -71,9 +72,10 @@ server {
<Proxy *>
Order allow,deny
Allow from all
AllowEncodedSlashes NoDecode
</Proxy>
ProxyPass /git http://localhost:3000 # Note: no trailing slash after either /git or port
ProxyPass /git http://localhost:3000 nocanon # Note: no trailing slash after either /git or port
ProxyPassReverse /git http://localhost:3000 # Note: no trailing slash after either /git or port
</VirtualHost>
```
Expand Down

0 comments on commit cc384d7

Please sign in to comment.