Hi,
I have successfully used mup to deploy a meteor app to a linode instance. In mup.json
I have specified the env{}
to have a port of 3000
With a new app, I set the port
of 3001
and so adjust my nginx vhost accordingly, but the page gives 502 Bad Gateway. Nginx nginx/1.6.2
Below is the nginx vhost and the mup.json
Any ideas?
Thanks
server {
listen *:80;
server_name example.com;
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Forwarded-For $remote_addr;
}
}
// mup.json
{
// Server authentication info
"servers": [
{
"host": "109.74.205.44",
"username": "jonwhittlestone",
// "password": "password"
// or pem file (ssh based authentication)
"pem": "~/.ssh/id_rsa.bak.pub"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": false,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.33 by default. Do not use v, only version number.
"nodeVersion": "0.10.28",
// Install PhantomJS in the server
"setupPhantom": true,
// Application name (No spaces)
"appName": "example",
// Location of app (local directory)
"app": "/Users/jonwhittlestone/code/example",
// Configure environment
"env": {
"ROOT_URL": "http://meteorfreelancer.com",
"PORT": "3001", // The port you want to bind to on your server.
"UPSTART_UID": "jonwhittlestone" // The user you want to run meteor as.
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}