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:
appx.xxxxx.com uses an invalid security certificate. The certificate is only valid for xxxxx.com (Error code: ssl_error_bad_cert_domain)
This is not correct. The certificate is from letsencrypt and covers xxxxx.com as well as appx.xxxxx.com.
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>
ServerName appx.xxxxx.com
ProxyRequests Off
SSLEngine on
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPreserveHost On
SSLCertificateFile /etc/letsencrypt/live/xxxxx.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxxxx.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/xxxxx.com/fullchain.pem
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / https://appx.xxxxx.com:8011/
ProxyPassReverse / https://appx.xxxxx.com:8011/
</VirtualHost>