I'm having difficulty deploying my meteor application ("myApp" below) into production using meteor-up with https and NGINX as a proxy server. In particular, I think I'm having trouble setting up the correct ports and / or paths.
In most cases, deployment works. It runs on a digital ocean drop using the mongohq database (now compose.io). My mup setup , mup reconfig (now executed many times in my mup.json file) and mup deploy with meteor-up all do not report any errors. If I ssh into my ubuntu environment in the digital ocean and run the status myApp , it tells myApp start/running, process 10049 , and when I check my mongohq database, I see that the expected collections for myApp were created and seeded. I think, on this basis, the application is working correctly.
My problem is that I canโt find it on the site and having no experience with NGINX servers, I canโt say if I am doing something very simple and incorrect port creation and forwarding.
I reproduced the corresponding parts of the NGINX configuration file and the mup.json file below.
The behavior that I expected when setting up below is that if my meteor application listens on port 3000 in mup.json, the application should appear when I enter the site. In fact, if I set mup.json env.PORT to 3000, when I visit the site, my browser tells me that there is a redirect cycle. If I change mup env.PORT to 80 or completely leave env.PORT, I get a 502 Bad Gateway message - this part should be expected because myApp should listen on localhost: 3000, and I would not expect to find anywhere else.
All help is greatly appreciated.
MUP.JSON (in the corresponding part, lmk, if you need to show more)
"env": { "PORT": 3000, "NODE_ENV": "production", "ROOT_URL": "http://myApp.com", "MONGO_URL": // working ok, not reproduced here, "MONGO_OPLOG_URL": // working ok I think, "MAIL_URL": // working ok }
Nginx
server_tokens off;
Also note that SSL certificates are configured and working fine, so I think this is how ports, paths, and forwarding are configured. I donโt know where the call forwarding comes from.