Mupx HTTPS 502 Bad gateway

I have recently installed the reaction commerce framework on my ec2 server. I am able to connect to the site using the ip and http://mysite.com but not with https - I get the 502 error. I have tested the cert and its good it does the mupx setup no problems and deploys no problems but I cant connect to it via https. Please help, Im not as good at devops as Id like to be. Thanks.

Have you configured your mup.json with your cert information?

Yes, it goes through the setup and deploy perfectly.
Im even getting the green lock.

Do you have traffic on 443 enabled in your security group on ec2?

Yes, Im at my wits end. All my other projects on ec2 work fine.

Are you using https://atmospherejs.com/meteor/force-ssl?

I just tried that and it forced me to the https which doesnt work. I wasnt able to get to the site by ip like before so I removed it.

Well my next step would be to remove the ssl stuff from the mupx deployment and just handle the ssl at the nginx level?

Ill have to look into how to do that, not too familiar with it. >.<

I cant even find the dang nginx conf file…I tried to look in the docker containers folders but its giving me permission denied. I looked in all the places it says to online and there is no nginx folder…please help.

Well, by default, mupx is going to try to serve your app at port 80. What you will need to do is to install nginx on your server, run your mupx deployment on another port, and use a reverse proxy in your nginx config. Then, you can set your ssl up at the nginx level. Does that make sense?

Not really, Ive never really dug into nginx too much. Ill look some stuff up and see what I can figure out. Thanks!

Hey man I am getting that error in a site I switched over from modulus to aws ec2 so now this issue is much more urgent. Is there any way you can give me a lil hand in understanding this situation a little bit better?
Like for instance when I search if nginx is running - it says it is, but I can find the folder anywhere to even look at the config file. Any help is appreciated.

If you are running ubuntu, your nginx conf is likely in /etc/nginx/sites-available/.

Also, this tutorial is a bit dated and doesn’t use mup, but the conf file looks good to me.

Pay attention to the following lines:

// These are the paths to your cert files
ssl_certificate /etc/nginx/ssl/todos.pem; # full path to SSL certificate and CA certificate concatenated together
ssl_certificate_key /etc/nginx/ssl/todos.key; # full path to SSL key

// You will need to change 8080 to whatever port you set up in your mupx deployment
proxy_pass http://127.0.0.1:8080;

// And of course you will need to use your server name anywhere you see:
server_name todos.net;