diff --git a/playbooks/roles/gitea/templates/gitea.vhost.j2 b/playbooks/roles/gitea/templates/gitea.vhost.j2 index ca71238fb1..1af73797ae 100644 --- a/playbooks/roles/gitea/templates/gitea.vhost.j2 +++ b/playbooks/roles/gitea/templates/gitea.vhost.j2 @@ -17,7 +17,7 @@ Listen 3081 LogLevel warn - LogFormat "%h:%{remote}p %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combinedport + LogFormat "%h:%{remote}p %A:%{proxy-source-port}n %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combinedport CustomLog ${APACHE_LOG_DIR}/gitea-ssl-access.log combinedport SSLEngine on @@ -37,6 +37,9 @@ Listen 3081 Use UserAgentFilter + # Disable x-forwarded- headers because gitea logging can't + # parse them properly + ProxyAddHeaders Off ProxyPass /.well-known/ ! ProxyPass / https://{{ inventory_hostname }}:3000/ retry=0 ProxyPassReverse / https://{{ inventory_hostname }}:3000/