Hi,
This is my first post, so please be kind.
I am jusrt trying to get uppy to work as a POC for a personal project I am doing and it is not working. I apache2 installed with self signed certs and configured the proxy / ssl settings as below (Point 1). (in the default-ssl.conf configuration file). I have also installed tusd on the server and have it running as per (point 2)
Server: 18.04.1-Ubuntu
Apache: Server version: Apache/2.4.29 (Ubuntu)
Tusd: Version: v1.8.0
POINT 1
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
ServerName 52.64.172.171
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
SSLProxyEngine on
RequestHeader set X-Forwarded-Proto "https"
ProxyPreserveHost on
ProxyPass /files http://localhost:1080/files
ProxyPassReverse /files http://localhost:1080/files
</VirtualHost>
</IfModule>
POINT 2
tusd -verbose -upload-dir=/var/www/html/files/ -host=127.0.0.1 -port=1080
[tusd] 2022/01/09 06:21:03.874554 Using '/var/www/html/files' as directory storage.
[tusd] 2022/01/09 06:21:03.874791 Using 0.00MB as maximum size.
[tusd] 2022/01/09 06:21:03.874946 Using 127.0.0.1:1080 as address to listen.
[tusd] 2022/01/09 06:21:03.875025 Using /files/ as the base path.
[tusd] 2022/01/09 06:21:03.875156 Using /metrics as the metrics path.
[tusd] 2022/01/09 06:21:03.875333 Supported tus extensions: creation,creation-with-upload,termination,concatenation,creation-defer-length
[tusd] 2022/01/09 06:21:03.875540 You can now upload files to: http://127.0.0.1:1080/files/
The html page is as follows (very basic and from an online demo page)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Multiple Image Upload with Preview and Delete jQuery Plugin</title>
<link href="https://transloadit.edgly.net/releases/uppy/v1.6.0/uppy.min.css" rel="stylesheet">
</head>
<body>
<div id="drag-drop-area"></div>
<script src="https://transloadit.edgly.net/releases/uppy/v1.6.0/uppy.min.js"></script>
<script>
var uppy = Uppy.Core()
.use(Uppy.Dashboard, {
inline: true,
target: '#drag-drop-area'
})
.use(Uppy.Tus, {endpoint: 'https://52.64.172.171/files/'}) //you can put upload URL here, where you want to upload images
uppy.on('complete', (result) => {
console.log('Upload complete! We’ve uploaded these files:', result.successful)
})
</script>
</body>
</html>
If I try to run the upload script it just sits there then errors out with a 502 Error (Proxy Gateway error)?
If I run a simply http get I get this, but nothing is seen on the tuxd console.
[Sun Jan 09 06:27:38.586082 2022] [proxy_http:error] [pid 17153:tid 140285308827392] (103)Software caused connection abort: [client 149.167.169.121:8203] AH01102: error reading status line from remote server tusd.tusdemo.net:443
[Sun Jan 09 06:27:38.586304 2022] [proxy:error] [pid 17153:tid 140285308827392] [client 149.167.169.121:8203] AH00898: Error reading from remote server returned by /files
When I run the script I also get this on the http error log, but what seems odd is the tusd.tusdemo.net:443 line as the endpoint is {endpoint: ‘https://52.64.172.171/files/’}
Sun Jan 09 06:30:52.122676 2022] [proxy_http:error] [pid 17152:tid 140285216507648] (103)Software caused connection abort: [client 149.167.169.121:8345] AH01102: error reading status line from remote server tusd.tusdemo.net:443, referer: https://52.64.172.171/
[Sun Jan 09 06:30:52.122908 2022] [proxy:error] [pid 17152:tid 140285216507648] [client 149.167.169.121:8345] AH00898: Error reading from remote server returned by /files/, referer: https://52.64.172.171/
[Sun Jan 09 06:30:57.959914 2022] [proxy_http:error] [pid 17153:tid 140285174544128] (103)Software caused connection abort: [client 149.167.169.121:8349] AH01102: error reading status line from remote server tusd.tusdemo.net:443, referer: https://52.64.172.171/
[Sun Jan 09 06:30:57.960120 2022] [proxy:error] [pid 17153:tid 140285174544128] [client 149.167.169.121:8349] AH00898: Error reading from remote server returned by /files/, referer: https://52.64.172.171/
I have tried for quite some time on this so if anyone has any suggestions I would appreciate it a lot as I am not sure what it can be.
Thank you,
Paul