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 <gary@garykim.dev>
This commit is contained in:
parent
61ad048041
commit
cc384d767e
2 changed files with 8 additions and 4 deletions
|
@ -53,7 +53,8 @@ If you want Apache HTTPD to serve your Gitea instance, you can add the following
|
||||||
...
|
...
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyRequests off
|
ProxyRequests off
|
||||||
ProxyPass / http://localhost:3000/
|
AllowEncodedSlashes NoDecode
|
||||||
|
ProxyPass / http://localhost:3000/ nocanon
|
||||||
ProxyPassReverse / http://localhost:3000/
|
ProxyPassReverse / http://localhost:3000/
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
@ -70,9 +71,10 @@ In case you already have a site, and you want Gitea to share the domain name, yo
|
||||||
<Proxy *>
|
<Proxy *>
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from all
|
Allow from all
|
||||||
|
AllowEncodedSlashes NoDecode
|
||||||
</Proxy>
|
</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
|
ProxyPassReverse /git http://localhost:3000 # Note: no trailing slash after either /git or port
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
|
|
@ -54,7 +54,8 @@ server {
|
||||||
...
|
...
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyRequests off
|
ProxyRequests off
|
||||||
ProxyPass / http://localhost:3000/
|
AllowEncodedSlashes NoDecode
|
||||||
|
ProxyPass / http://localhost:3000/ nocanon
|
||||||
ProxyPassReverse / http://localhost:3000/
|
ProxyPassReverse / http://localhost:3000/
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
@ -71,9 +72,10 @@ server {
|
||||||
<Proxy *>
|
<Proxy *>
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from all
|
Allow from all
|
||||||
|
AllowEncodedSlashes NoDecode
|
||||||
</Proxy>
|
</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
|
ProxyPassReverse /git http://localhost:3000 # Note: no trailing slash after either /git or port
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
|
Reference in a new issue