GitLab behind Apache reverse proxy: Error uploading file. Please try again

When I try to upload a file to a GitLab repository it says “Error uploading file. Please try again.”
I am able to upload files through the Web IDE just fine.
Any help is appreciated.

Browser console:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Gitlab error log in Apache:

[Thu Apr 27 08:53:57.885838 2023] [proxy_http:error] [pid 175146] [client 87.249.134.132:11613] AH01097: pass request body failed to 127.0.0.1:8181 (127.0.0.1) from 87.249.134.132 (), referer: https://gitlab.sowgro.net/group1/test
[Thu Apr 27 08:53:57.914247 2023] [proxy:error] [pid 175146] (104)Connection reset by peer: [client 87.249.134.132:11613] AH01084: pass request body failed to 127.0.0.1:8181 (127.0.0.1), referer: https://gitlab.sowgro.net/group1/test

Apache virtual host:

SetEnv nokeepalive ssl-unclean-shutdown

SSLEngine on
#strong encryption ciphers only
#see ciphers(1) http://www.openssl.org/docs/apps/ciphers.html
SSLProtocol all -SSLv2
SSLHonorCipherOrder on
SSLCipherSuite "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS"
Header add Strict-Transport-Security: "max-age=15768000;includeSubsowgro.nets"
SSLCompression Off
#CentOS

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/sowgro.net-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/sowgro.net-0001/privkey.pem
SSLCACertificateFile /etc/letsencrypt/live/sowgro.net/fullchain.pem
ServerName gitlab.sowgro.net
ServerSignature Off
ProxyPreserveHost On

# Ensure that encoded slashes are not decoded but left in their encoded state.
# http://doc.gitlab.com/ce/api/projects.html#get-single-project
AllowEncodedSlashes NoDecode

<Location />
    # New authorization commands for apache 2.4 and up
    # http://httpd.apache.org/docs/2.4/upgrading.html#access
    Require all granted

    #Allow forwarding to gitlab-workhorse
    ProxyPassReverse http://127.0.0.1:8181/
    ProxyPassReverse http://gitlab.sowgro.net/
</Location>

# Apache equivalent of nginx try files
# http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on

#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on

# needed for downloading attachments
DocumentRoot /home/git/gitlab/public

#Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
ErrorDocument 404 /404.html
ErrorDocument 422 /422.html
ErrorDocument 500 /500.html
ErrorDocument 502 /502.html
ErrorDocument 503 /503.html

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded

ErrorLog /var/log/apache2/gitlab_error.log
CustomLog /var/log/apache2/gitlab_forwarded.log common_forwarded
CustomLog /var/log/apache2/gitlab_access.log combined env=!dontlog
CustomLog /var/log/apache2/gitlab_SERVER_FQDN.log combined

gitlab.rb:

puma['worker_processes'] = 0
prometheus_monitoring['enable'] = false
sidekiq['max_concurrency'] = 10
external_url 'https://gitlab.sowgro.net'
gitlab_rails['trusted_proxies'] = ['127.0.0.1']
gitlab_rails['allowed_hosts'] = ['127.0.0.1']
gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "127.0.0.1:8181"
web_server['external_users'] = ['www-data']
nginx['enable'] = false
nginx['listen_port'] = 8081
nginx['listen_https'] = false