mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Only rewrite URLs in Gitea (not HTTPD)
Source: https://docs.gitea.io/en-us/reverse-proxies/
This commit is contained in:
parent
69f8963b34
commit
59c67ddf60
2 changed files with 11 additions and 5 deletions
|
@ -119,7 +119,7 @@ FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
|
||||||
; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'.
|
; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'.
|
||||||
PROTOCOL = http
|
PROTOCOL = http
|
||||||
DOMAIN = localhost
|
DOMAIN = localhost
|
||||||
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
|
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s{{ gitea_url }}/
|
||||||
; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
|
; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
|
||||||
HTTP_ADDR = 0.0.0.0
|
HTTP_ADDR = 0.0.0.0
|
||||||
HTTP_PORT = {{ gitea_port }}
|
HTTP_PORT = {{ gitea_port }}
|
||||||
|
|
|
@ -1,11 +1,17 @@
|
||||||
# All URLs go to Gitea web server. Static content is bundled in the executable.
|
# All URLs go to Gitea web server. Static content is bundled in the executable.
|
||||||
|
ProxyPreserveHost On
|
||||||
ProxyRequests off
|
ProxyRequests off
|
||||||
ProxyPass {{ gitea_url }}/ http://localhost:{{ gitea_port }}/
|
|
||||||
|
<Proxy *>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</Proxy>
|
||||||
|
|
||||||
|
# Note: no trailing slash after either {{ gitea_url }} or port
|
||||||
|
ProxyPass {{ gitea_url }} http://localhost:{{ gitea_port }}
|
||||||
|
ProxyPassReverse {{ gitea_url}} http://localhost:{{ gitea_port }}
|
||||||
|
|
||||||
<Location {{ gitea_url }}/>
|
<Location {{ gitea_url }}/>
|
||||||
ProxyPassReverse /
|
|
||||||
ProxyHTMLEnable On
|
|
||||||
ProxyHTMLURLMap / {{ gitea_url }}/
|
|
||||||
RequestHeader unset Accept-Encoding
|
RequestHeader unset Accept-Encoding
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue