Skip to content

Commit cc384d7

Browse files
gary-kimlafriks
authored andcommitted
Specify using AllowEncodedSlashes and nocanon for httpd (#7540)
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 <[email protected]>
1 parent 61ad048 commit cc384d7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/content/doc/usage/reverse-proxies.en-us.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ If you want Apache HTTPD to serve your Gitea instance, you can add the following
5353
...
5454
ProxyPreserveHost On
5555
ProxyRequests off
56-
ProxyPass / http://localhost:3000/
56+
AllowEncodedSlashes NoDecode
57+
ProxyPass / http://localhost:3000/ nocanon
5758
ProxyPassReverse / http://localhost:3000/
5859
</VirtualHost>
5960
```
@@ -70,9 +71,10 @@ In case you already have a site, and you want Gitea to share the domain name, yo
7071
<Proxy *>
7172
Order allow,deny
7273
Allow from all
74+
AllowEncodedSlashes NoDecode
7375
</Proxy>
7476
75-
ProxyPass /git http://localhost:3000 # Note: no trailing slash after either /git or port
77+
ProxyPass /git http://localhost:3000 nocanon # Note: no trailing slash after either /git or port
7678
ProxyPassReverse /git http://localhost:3000 # Note: no trailing slash after either /git or port
7779
</VirtualHost>
7880
```

docs/content/doc/usage/reverse-proxies.zh-cn.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ server {
5454
...
5555
ProxyPreserveHost On
5656
ProxyRequests off
57-
ProxyPass / http://localhost:3000/
57+
AllowEncodedSlashes NoDecode
58+
ProxyPass / http://localhost:3000/ nocanon
5859
ProxyPassReverse / http://localhost:3000/
5960
</VirtualHost>
6061
```
@@ -71,9 +72,10 @@ server {
7172
<Proxy *>
7273
Order allow,deny
7374
Allow from all
75+
AllowEncodedSlashes NoDecode
7476
</Proxy>
7577
76-
ProxyPass /git http://localhost:3000 # Note: no trailing slash after either /git or port
78+
ProxyPass /git http://localhost:3000 nocanon # Note: no trailing slash after either /git or port
7779
ProxyPassReverse /git http://localhost:3000 # Note: no trailing slash after either /git or port
7880
</VirtualHost>
7981
```

0 commit comments

Comments
 (0)