title: Gitea Git-LFS HTTP 413 Error when pushing large files
body: <p>Disclaimer up front: I'm very new to Linux/Ubuntu as a whole and system administration as well only having dabbled with it in my free time so please be patient and thorough with your answers.</p>
  <p>I installed Gitea on my Ubuntu 20.04 server with git-lfs.
  I have Apache running a reverse proxy to use my subdomain with gitea. I also have it configured for SSH using certbot.</p>
  <p>Every time I try to push a large file (~&gt;1Gb) I get an LFS: Client error from HTTP 413.</p>
  <p>What I've tried so far:</p>
  <ul>
  <li>disable UFW</li>
  <li>Increase all relevant file and file size options in the gitea config</li>
  </ul>
  <p>Here is my app.ini:</p>
  <pre><code>APP_NAME = Tali Git
  RUN_USER = git
  RUN_MODE = prod
  
  [security]
  INTERNAL_TOKEN     = XXXXX
  INSTALL_LOCK       = true
  SECRET_KEY         = XXXXXXX
  PASSWORD_HASH_ALGO = pbkdf2
  
  [database]
  DB_TYPE  = sqlite3
  HOST     = 127.0.0.1:3306
  NAME     = gitea
  USER     = gitea
  PASSWD   = 
  SCHEMA   = 
  SSL_MODE = disable
  CHARSET  = utf8
  PATH     = /var/lib/gitea/data/gitea.db
  LOG_SQL  = false
  
  [repository]
  ROOT = /var/lib/gitea/data/gitea-repositories
  
  [repository.upload]
  FILE_MAX_SIZE = 999999999999
  MAX_FILES = 999999999999
  
  [server]
  SSH_DOMAIN       = git.example.com
  DOMAIN           = git.example.com
  HTTP_PORT        = 3000
  ROOT_URL         = https://git.example.com/
  DISABLE_SSH      = false
  SSH_PORT         = 22
  LFS_START_SERVER = true
  LFS_CONTENT_PATH = /var/lib/gitea/data/lfs
  LFS_JWT_SECRET   = XXXXXXXXXXXX
  LFS_MAX_FILE_SIZE = 999999999999999999999999
  OFFLINE_MODE     = false
  LFS_HTTP_AUTH_EXPIRY = 999999m
  
  [mailer]
  ENABLED = false
  
  [service]
  REGISTER_EMAIL_CONFIRM            = false
  ENABLE_NOTIFY_MAIL                = false
  DISABLE_REGISTRATION              = true
  ALLOW_ONLY_EXTERNAL_REGISTRATION  = false
  ENABLE_CAPTCHA                    = false
  REQUIRE_SIGNIN_VIEW               = false
  DEFAULT_KEEP_EMAIL_PRIVATE        = false
  DEFAULT_ALLOW_CREATE_ORGANIZATION = true
  DEFAULT_ENABLE_TIMETRACKING       = true
  NO_REPLY_ADDRESS                  = noreply.localhost
  
  [picture]
  DISABLE_GRAVATAR        = false
  ENABLE_FEDERATED_AVATAR = true
  
  [openid]
  ENABLE_OPENID_SIGNIN = true
  ENABLE_OPENID_SIGNUP = true
  
  [session]
  PROVIDER = file
  
  [log]
  MODE      = console
  LEVEL     = info
  ROOT_PATH = /var/lib/gitea/log
  ROUTER    = console
  
  [ui]
  DEFAULT_THEME = arc-green
  THEMES = gitea,arc-green
  </code></pre>
  <p>The apache HTTP proxy:</p>
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName git.example.com
      ProxyPreserveHost On
      ProxyRequests off
      ProxyPass / http://localhost:3000/
      ProxyPassReverse / http://localhost:3000/
  LimitRequestBody 0
  RewriteEngine on
  RewriteCond %{SERVER_NAME} =git.example.com
  RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
  &lt;/VirtualHost&gt;
  </code></pre>
  <p>The apache SSH proxy:</p>
  <pre><code>&lt;IfModule mod_ssl.c&gt;
  &lt;VirtualHost *:443&gt;
  &lt;Directory /&gt;
      SSLRenegBufferSize 2147483647
  &lt;/Directory&gt;
      ServerName git.example.com
      ProxyPreserveHost On
      ProxyRequests off
      ProxyPass / http://localhost:3000/
      ProxyPassReverse / http://localhost:3000/
  
  SSLCertificateFile /etc/letsencrypt/live/git.example.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/git.example.com/privkey.pem
  Include /etc/letsencrypt/options-ssl-apache.conf
  &lt;/VirtualHost&gt;
  &lt;/IfModule&gt;
  </code></pre>
  <p>There was nothing that stood out in the Apache access or error log.</p>
  <p>The relevant Gitea log with log level trace can be found here: <a href="https://pastebin.com/XgbQaZn0" rel="nofollow noreferrer">https://pastebin.com/XgbQaZn0</a></p>
  <p>Any tips, ideas or shared experiences would be highly appreciated. I'm at a total loss here.</p>