Cannot setup tus and uppy correctly on Apache

Hello everyone,

I am desperatly trying to make tus work correctly on my server.

At the moment I can upload a file from my front end with uppy to my back end. The uploading of files work fine but I cannot make it stop/resume. If I interrupt the upload I cannot resume it back. I have to wait one or two minute to be able to resume it back.

In the back end the file is locked and tus say that I cannot write on a locked file.
I see the file size growing even after interumpting the upload in the front. After a minute it stop growing and the lock disapear. After that I can resume my upload. But If I resume my upload before that it will fail and I have to restart from the beginning.

I will show you the apache2 configurations and the front end code.

<!DOCTYPE html>
<html lang="en">
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Video Portal</title>
	<link href="" rel="stylesheet">
	<script src="script.js" defer></script>
	<title>Test PHP</title>
	<div id="drag-drop-area"></div>

    <script src=""></script>
      var uppy = new Uppy.Core()
        .use(Uppy.Dashboard, {
          inline: true,
          target: '#drag-drop-area'
        // .use(Uppy.Tus, {endpoint: ''})
        .use(Uppy.Tus, {endpoint: ''})

      uppy.on('complete', (result) => {
        console.log('Upload complete! We’ve uploaded these files:', result.successful)
<IfModule mod_ssl.c>
<VirtualHost *:443>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.

	DocumentRoot /var/www/
	# DocumentRoot /var/www/
	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

   	# In order that tusd can construct correct upload URLs, we tell tusd
   	# that the HTTPS protocol is used and also forward the original Host
   	# Header.
   	RequestHeader set X-Forwarded-Proto "https"
   	ProxyPreserveHost on

	# Pass requests to tusd server
	ProxyPass "/files" "http://localhost:1080/files"
    ProxyPassReverse "/files" "http://localhost:1080/files"
    ProxyPass "/metrics" "http://localhost:1080/metrics"
    ProxyPassReverse "/metrics" "http://localhost:1080/metrics"

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteCond %{SERVER_NAME} [OR]
# RewriteCond %{SERVER_NAME}
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/

Thanks for your help,
Have a nice day.

Thank you for your report. Does the resuming work if you point Uppy directly to your tus server, i.e. without going through Apache first? Maybe the proxy is acting in a way that confuses the tus server. Also, what tus server are you using?