Meteor app with mupx using SSL and port forward just doesn't work

I have the following configuration:

  • Deploying a meteor app with mupx to a digital ocean droplet running Ubuntu
  • I’m using Apache on the droplet which is also running Wordpress
  • The meteor app is deployed to a subdomain and using SSL

I am using a proxy to forward the meteor app from a normal http domain to an https domain with a special port (8011).

I can access the main domain with http (wordpress). I can access the meteor app directly as this:

But the forward proxy does not work, so if I try to access:

It gives me an error related to the certificate I am using: uses an invalid security certificate. The certificate is only valid for (Error code: ssl_error_bad_cert_domain)

This is not correct. The certificate is from letsencrypt and covers as well as
So it is really strange. Also the fact that the certificate works well when I access the meteor app directly as this:

Any help is much appreciated. I’ve struggled several days with this problem.

My apache config looks like this:

<VirtualHost *:443>
  ProxyRequests Off
  SSLEngine on
  SSLProxyEngine on
  SSLProxyVerify none
  SSLProxyCheckPeerCN off
  SSLProxyCheckPeerName off
  SSLProxyCheckPeerExpire off
  ProxyPreserveHost On
  SSLCertificateFile /etc/letsencrypt/live/
  SSLCertificateKeyFile /etc/letsencrypt/live/
  SSLCertificateChainFile /etc/letsencrypt/live/
  <Proxy *>
  Order deny,allow
  Allow from all
  ProxyPass /
  ProxyPassReverse /

I hired someone to help me as it was getting too complex.
The main problem seemed to be that the stud service was using 443 and had not been disabled.
I originally used mup to deploy the meteor app. mup uses stud for ssl.
Then I later to switched to mupx but didn’t stop stud (as otherwise suggested in the migration guide :expressionless: )
There were various other issues as well but this was the main one.