A meteor app successfully deployed using this mup.js “MeteorUp”, the app allows users to select from 500+ audio files with accumulated size of 20Gb+ which made the app VERY slow to impossible to start (in development), so in production, I decided to use Apache2 listening on a different port to serve the audio files directly by providing the link to the user browser
<audio some attr…> <source src=http://ip:port/path/to/file.mp3 type=”audio/mpeg>some text</audio>.
Now with mup.js uses let’s encrypt, the link above gets converted to “https” when inspecting the page under Chrome and other browsers, that creates an error in the browser console, GET https://ip:port/path/to/file.mp3 net::ERR_SSL_PROTOCOL_ERROR, and the audio play panel gets greyed out a second after the page loads, however Firefox plays the audio with no errors.
Why is this happening but more importantly, how to solve it? Please. Thank you
here is the mup.js file
module.exports = {
servers: {
one: {
host: 'THE VPS IP ADDRESS',
username: 'root',
password: 'PASSWORD',
opts: {
port: VPS PORT NUMBER
}
}
},
app: {
name: 'audio',
path: '../',
servers: {
one: {},
},
buildOptions: {
serverOnly: true,
},
env: {
ROOT_URL: 'https://MY DOMAIN NAME',
MONGO_URL: 'mongodb://mongodb/meteor',
MONGO_OPLOG_URL: 'mongodb://mongodb/local',
},
volumes: {
#where the audio files are saved for the Apache2 to serve from
'/var/www/html/Audio/':'/Audio',
},
docker: {
image: 'abernix/meteord:node-12-base',
},
enableUploadProgressBar: true
},
mongo: {
version: '3.4.1',
servers: {
one: {}
}
},
proxy: {
domains: 'MY DOMAIN NAME,www.MY DOMAIN NAME',
ssl: {
letsEncryptEmail: 'EMAIL ADDRESS',
forceSSL: true
}
}
};
Here is the Apache2 port.conf file
# /etc/apache2/sites-enabled/000-default.conf
Listen Port Number 80xx
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet