Mup: SSL setup fails [resolved]

For the first time, I am trying to setup a Meteor 3 app on AWS. mup setup and mup deploy worked fine. However, when I try to access the server via https, I am getting a 500 Internal Server Error.

My SSL config in mup.js looks like this:

proxy: {
    domains:
      'sub.domain.com',
    ssl: {
      letsEncryptEmail: 'my.email@gmx.net',
      forceSSL: true
    }
  },

which is pretty straightforward and worked fine for my other app. There’s also a A DNS recording pointing to the correct IP address.

I also tried mup reconfig, but this did not help.

If I lookup my domain on https://crt.sh, I cannot see any SSL certificate for the domain.

I don’t see any errors in the logs. However, if I try to access the server via http, I can see an error:

This seems to be coming from aldeed:collection2, but worked fine on my local dev machine. Maybe it’s just related to missing files, because they cannot be downloaded via HTTPS.

So I assume the root cause is the missing SSL cert.

What might be the issue here?

Everything is supposed to be bundled already. Are you able to run production on your local station just to make sure the code is production viable?
Also, import 'meteor/aldeed:collection2/static' has to be the first thing to import in server/main.js. Everything else comes after.

1 Like

Thanks. I had the import in place, but obviously it worked differently on a production bundle. I commented the attachSchema call out for now. With just HTTP, this worked fine. Now trying out to re-enable HTTPS.

Ok. Fixing this seemed to do the trick. Interesting that the whole SSL setup does not work if the server throws an error. Did not know that.