You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documents for Gitea behind reverse proxy. Fix some small bugs (some URLs are generated without sub-path) (#17320)
* Apache `ProxyPassReverse` only works for Location, Content-Location and URI headers on HTTP redirect responses, it causes more problems than it resolves. Now all URLs generated by Gitee have the correct prefix AppSubURL. We do not need to set `ProxyPassReverse`.
* fix url param
* use AppSubURL instead of AppURL in api/v1
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration.
54
+
Then you **MUST**set something like `[server] ROOT_URL = http://git.example.com/git/` correctly in your configuration.
53
55
54
56
## Nginx and serve static resources directly
55
57
@@ -139,11 +141,10 @@ If you want Apache HTTPD to serve your Gitea instance, you can add the following
139
141
ProxyRequests off
140
142
AllowEncodedSlashes NoDecode
141
143
ProxyPass / http://localhost:3000/ nocanon
142
-
ProxyPassReverse / http://localhost:3000/
143
144
</VirtualHost>
144
145
```
145
146
146
-
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`
147
+
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`.
147
148
148
149
If you wish to use Let's Encrypt with webroot validation, add the line `ProxyPass /.well-known !` before `ProxyPass` to disable proxying these requests to Gitea.
149
150
@@ -161,13 +162,12 @@ In case you already have a site, and you want Gitea to share the domain name, yo
161
162
AllowEncodedSlashes NoDecode
162
163
# Note: no trailing slash after either /git or port
163
164
ProxyPass /git http://localhost:3000 nocanon
164
-
ProxyPassReverse /git http://localhost:3000
165
165
</VirtualHost>
166
166
```
167
167
168
-
Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration.
168
+
Then you **MUST**set something like `[server] ROOT_URL = http://git.example.com/git/` correctly in your configuration.
169
169
170
-
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`
170
+
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`.
0 commit comments