1
0
Fork 0
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:
Aidan Fitzgerald 2019-03-07 12:48:45 -05:00
parent 69f8963b34
commit 59c67ddf60
2 changed files with 11 additions and 5 deletions

View file

@ -119,7 +119,7 @@ FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'.
PROTOCOL = http
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.
HTTP_ADDR = 0.0.0.0
HTTP_PORT = {{ gitea_port }}

View file

@ -1,11 +1,17 @@
# All URLs go to Gitea web server. Static content is bundled in the executable.
ProxyPreserveHost On
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 }}/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / {{ gitea_url }}/
RequestHeader unset Accept-Encoding
</Location>