8

I'm trying to connect to my Meteor project via SSL/TLS.

Therefore I did the following:

meteor add force-ssl

in the meteor folder. Then I start the programm with 'meteor'.

Everything is running fine on localhost, but if I want to connect to the server with giving the IP and Port over http, I get redirected to a https connection with the same IP and an 'Unable to connect message'.

Note: I created a certificate on my own an put it into the Meteor/server folder.

Does anyone know my mistake?

torrential coding
  • 1,755
  • 2
  • 24
  • 34
user2471392
  • 81
  • 1
  • 3

2 Answers2

12

If you need to enable SSL support for your Meteor app deployed with Meteor Up. Now it has the support for SSL. You just need to tell where the SSL certificate and the key are.

If you are not familiar with the process of generating a SSL certificate, follow this guide.

Disclaimer: I'm the author of Meteor Up.

Arunoda Susiripala
  • 2,516
  • 1
  • 25
  • 30
11

You can't just put the certificate inside Meteor/server folder. You will need a web server to proxy the request and configure that server with your certificate (Docs also say that, search for force-ssl: http://docs.meteor.com/)

I recommend you to put an nginx instance as the proxy. Here an example of how to do it: http://www.digicert.com/ssl-certificate-installation-nginx.htm

gabrielhpugliese
  • 2,588
  • 19
  • 19
  • Thanks for your answer, but I have absolutly no idea what to do. I have a Meteor Server running on localhost Port 3000. I have installed nginx. But now I don't know how to proceed. What is my nginx virtual host file? Is it /usr/local/nginx/conf/nginx.conf ?? – user2471392 Jun 11 '13 at 16:28
  • 4
    Well, if you know how to do it with Apache, then do with it. But I've made a gist for you. It's just a start of configuration that should run: https://gist.github.com/gabrielhpugliese/5759232. You can put it on `nginx.conf` inside the `http {}` scope (note that I've written it on the gist too). If this runs ok, don't forget to accept the answer :) – gabrielhpugliese Jun 11 '13 at 18:06