i have a web application that is used to build Cordova android app.
The application is built for an ubuntu server where is running a Nginx with SSL (Mongo is hosted on mongolab). On production i use a NodeJS 0.12.X, but in dev i still use meteor shell.
When i build the application i run this command :
meteor build …/…/build/mercanet/ --mobile-settings settings.json --server=https://myIP
When i run the application on server here is the command (on prod server i use node :
meteor --settings settings.json --mobile-server https://myIP --port 3000
If i open a browser to https://myIp i can check that websocket works well so my nginx is well configured. But if i open the application in my android emulator, it fails to connect : https://myIP/sockjs/info?cb=x3i8q_or0y (cancelled)
I tried without SSL and i replace HTTPS by HTTP in meteor shell and it worked, so i’m wondering what i should do to use HTTPS with MeteorJS and Cordova.
Argh, i don’t remember how we managed this (i’m no more on this project). I think it’s about nginx configuration but not sure.
I’ll update the post when i remember this.
// this is a vhost config for a mobile website (http | https)://mobile.myserver.fr used for cordova deployment
upstream upstream_name{
server 127.0.0.1:3006;
}