1

I'm trying to run two meteor apps on one VPS machine using the Reverse Proxy setup with meteor-up. According to MUP everything is working fine, however, I can only load one of the websites. Both websites run independently on separate VPS machines and there are no errors when I deploy the app to the same server using MUP.

I've set both DNS to the same server 11.11.11.111, is this the problem. Port 80 and 443 are open.

The website that won't load states Your connection is not private.

Here are my what my mup files look like.

App1: mup.js

module.exports = {
  servers: {
    one: {
      host: '11.11.11.111',
      username: 'myuser',
      pem: 'key'
    }
  },

  app: {
    name: 'App1',
    path: '../',

    docker: {
      image: 'abernix/meteord:node-8.4.0-base',
    },

    // list of servers to deploy to, from the 'servers' list
    servers: {
      one: {},
    },

    // All options are optional.
    buildOptions: {
      // Set to true to skip building mobile apps
      // but still build the web.cordova architecture. (recommended)
      serverOnly: true,
      debug: false,
    },
    env: {
      // If you are using SSL, this needs to start with https
      ROOT_URL: 'https://app1.com',
      MONGO_URL: 'myMonogoDBlink'
    },

    enableUploadProgressBar: true, // default false.
  },

  proxy: {
    domains: 'app1.com, www.app1.com',
    ssl: {
      // Enable let's encrypt to create free certificates
      letsEncryptEmail: '[email protected]',
      forceSSL: true
    }
  }
};

App2: mup.js

module.exports = {
  servers: {
    one: {
      host: '11.11.11.111',
      username: 'myuser',
      pem: 'key'
    }
  },

  app: {
    // TODO: change app name and path
    name: 'App2',
    path: '../',

    servers: {
      one: {},
    },

    buildOptions: {
      serverOnly: true,
      debug: false,
    },

    env: {
      ROOT_URL: 'https://www.app2.com',
      MONGO_URL: 'myMonogoDBlink',
    },

    docker: {
      image: 'abernix/meteord:node-8.4.0-base',
    },

    enableUploadProgressBar: true
  },
  proxy: {
    domains: 'app2.com,www.app2.com',

    ssl: {
      // Enable Let's Encrypt
      letsEncryptEmail: '[email protected]',
      forceSSL: true
    }
  }
};

UPDATE

=> Servers
  - 11.11.11.11: Ubuntu 16.04

=> Docker Status
 - 11.11.11.11: 18.06.1-ce Running

=> Meteor Status
 - 11.11.11.11: running 
    Created at 2018-09-19T12:16:33.361397945Z
    Restarted 0 times
=> Reverse Proxy Status
 - 11.11.11.11:
   - NGINX:
     - Status: running
     - Ports:
       - HTTPS: 443
       - HTTP: 80
   - Let's Encrypt
     - Status: running
1
  • Configs look ok, except they both refer to path=../. Could you provide the output of a docker ps please?
    – Mikkel
    Commented Sep 21, 2018 at 10:03

1 Answer 1

0

Ok, I think I've narrowed down the problem and found the solution.

I'm using Cloudflare and I have rules attached to my DNS to push all traffic to www. The crypto SSL section appears to be where the problem is occurring. It was set to flexible. This appears to be causing my connection to bounce between http and https.

The solution that worked was to change the crypto SSL section in Cloudflare to Full.

I also cleared the DNS Cache on my Mac but I don't think this had anything to do with the solution. Flush mac DNS cache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.