Merge "gitea: fix 3081 proxy"

This commit is contained in:
Zuul 2020-10-06 20:55:00 +00:00 committed by Gerrit Code Review
commit f3bbc8171f
4 changed files with 19 additions and 2 deletions

View File

@ -1 +1,16 @@
Install, configure, and run Gitea.
**Role Variables**
.. zuul:rolevar:: gitea_reverse_proxy
:default: False
Create an Apache reverse proxy listening on port 3081. This can be
useful for OSI layer 7 filtering; e.g. matching bad User-Agent
fields.
.. zuul:rolevar:: gitea_reverse_proxy_hostname
:default: inventory_hostname
The name of the hostname to reverse proxy to. Only necessary for
testing where we do not have a certificate for the hostname.

View File

@ -1,2 +1,3 @@
gitea_no_log: true
gitea_reverse_proxy: false
gitea_reverse_proxy_hostname: '{{ inventory_hostname }}'

View File

@ -69,7 +69,7 @@ Listen 3081
RewriteCond %{HTTP_USER_AGENT} "=Mozilla/4.0 (compatible; MSIE 6.0; ) Opera/UCWEB7.0.2.37/28/999"
RewriteRule . - [R=403,L]
ProxyPass / https://localhost:3000/ retry=0
ProxyPassReverse / https://localhost:3000/
ProxyPass / https://{{ gitea_reverse_proxy_hostname }}:3000/ retry=0
ProxyPassReverse / https://{{ gitea_reverse_proxy_hostname }}:3000/
</VirtualHost>

View File

@ -8,5 +8,6 @@ gitea_root_password: BUbBcpToMwR05ZCB
gitea_no_log: false
gitea_gerrit_password: yVpMWIUIvT7f6NwA
gitea_reverse_proxy: true
gitea_reverse_proxy_hostname: localhost
iptables_extra_public_tcp_ports:
- 3081