Meteor proxy https not working


#1

Hi, im trying to use https instead of http for my meteor application.
Im trying to use HTTPS because, some of mdg:geolocation functions is not working on HTTP. it said it will be fine in HTTPS.

I use force-ssl package and put some of this code refering to http://stackoverflow.com/questions/27963749/setup-https-ssl-on-localhost-for-meteor-development

var PATH_TO_KEY = "/usr/local/bin/here_test/server/here.enseval.com.key",  
    PATH_TO_CERT = "/usr/local/bin/here_test/server/star_enseval_com.pem";
    //PATH_TO_CHAIN = "";

var fs = require('fs'),  
    httpProxy = require('http-proxy');

var options = {  
  ssl: {    
    key: fs.readFileSync(PATH_TO_KEY, 'utf8'),
    cert: fs.readFileSync(PATH_TO_CERT, 'utf8')
    //ca : fs.readFileSync(PATH_TO_CHAIN, 'utf8')
  },
  target : "http://localhost:835",
  ws: true,
  xfwd: true
};

but I always end up fail when i’m trying to access https://my.domain.com
and error log is appearing like this
var server = httpProxy.createProxyServer(options).listen(443);

/usr/local/bin/here_test/node_modules/http-proxy/lib/http-proxy/index.js:119
    throw err;
          ^
Error: connect ECONNREFUSED
    at errnoException (net.js:905:11)
    at Object.afterConnect [as oncomplete] (net.js:896:19)
Exited with code: 8
Your application is crashing. Waiting for file change.

Maybe someone can help me with this confusing thing?
or maybe someone can give me another approach

Thank you :slight_smile: