Do you have the ‘force-ssl’ package installed? If so try removing that and see if that works. If that’s the case you can force SSL through the HAProxy config (or nginx config). Also does your mup config use https as the root_url?
I finally got this working. There were several things wrong with my setup (I’m using RapidSSL and EC2, so things may be different with other providers):
You will get a Web Server Certificate from RapidSSL once you get your SSL. I named mine ssl.crt.
You will also be directed to use RapidSSL Intermediate CAs. I downloaded them as separate files named primary.crt and secondary.crt respectively.
When building the ssl.pem used by mup, you need to concatinate all the files you get from RapidSSL plus the privatekey.key file you generated with the openssl command.
When you generated your privatekey.key file, most likely you encrypted it (that’s what is recommended). But when building your ssl.pem file you should use a decrypted version. Decrypt the privatekey.key file with this command:
When you concatenate the cert files into the ssl.pem file the END CERTIFICATE and BEGIN CERTIFICATE for each cert file will be right next to one another like so:
@aadams you’re write-up was awesome. Worked great for me. Thanks for working through this. I have a question, I followed your same setup and have everything working on https but http is still open. I was reading some articles that were saying using the force-ssl Meteor package was bad with mup and nginx. What method are you using to force/redirect https connections only? Do you modify the nginx config file? Where does that live exactly? Using Ubuntu 14 with mup.
EDIT: I was wrongly assuming MUP used nginx under the hood. It looks like it doesn’t. I think I can use the force-ssl package and it will work, but is there another way to force SSL in Ubuntu with the way MUP sets things up without adding that package to my code?
EDIT2: I disabled Stud and installed nginx as a reverse proxy with MUP. nginx used my above concatenated *.pem and the domain *.key that I originally downloaded. Works great and forwards http to https.
How do you configure SSL with mup when using the meteorhacks:cluster package? I have two droplets on DO, both of them are set as balancers, with the CLUSTER_BALANCER_URL property set to http://each.droplet.ip.address on both servers. After adding the ssl property to the mup config file, and if I change CLUSTER_BALANCER_URL to https://each.droplet.ip.address, the websocket connection won’t be initiated, since my certificate doesn’t cover the two IP addressed of my droplets.