question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to redirect http to https

See original GitHub issue

I wanted to open a new issue other than #521 since my specific setup might be different and unable to be answered in the same manner

I have an aws application load balancer setup which works fine but I need mup to route http to https, I tried using force-ssl package but it doesn’t seem to work. I wonder if it’s because it’s a non-standard port that I am using (because I have multiple apps running sharing a database)

I think there is a nginx rewrite or redirect rule that could be added with an option to the mup.js file redirectSSL: true so that during creation of the nginx docker instance, it would automatically start rerouting.

My mup.js is below

module.exports = {
  servers: {
    one: {
      host: "35.162.xxx.xxx",
      username: 'ubuntu',
      // pem:
      // password:
      // or leave blank for authenticate from ssh-agent
    },
  },
  meteor: {
    name: 'dashboard',
    path: '/Users/avi/Code/dashboard',
    ssl: {
      crt: './server.crt',
      key: './server.key',
      port: 8443,
    },
    servers: {
      one: {}
    },
    buildOptions: {
      serverOnly: true,
      debug: true,
    },
    deployCheckWaitTime: 220,
    docker: {
      image: 'abernix/meteord:base',
      args: [
        '--link=mongodb:mongodb'
      ],
    },
    env: {
      ROOT_URL: 'http://35.162.xxx.xxx',
      MONGO_URL: 'mongodb://mongodb:27017/staging-app-bnog',
      PORT: 8000,
      DEPLOY_TYPE: 'staging'
    },
  },
};

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
zoderncommented, Aug 11, 2017

Mup 1.3 will be able to redirect http to https.

4reactions
Farkalcommented, Jul 20, 2017

After hours trying to configure nginx proxy I find that there i a simple option in start.sh (on your server you can find it at /opt/YOUR_APP_NAME/config/start.sh ) HTTPS_METHOD=noredirect so just change it to HTTPS_METHOD=redirect and http will be redirected to https It should be possible to add a simple option to allow the user to define what method he want on the mup.js config file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Redirect Website from HTTP to HTTPS? - Geekflare
Go to Page Rules · Click “Create Page Rule” · Enter the URL (put the asterisk, so redirection happens for all the URI)...
Read more >
How to redirect all HTTP requests to HTTPS using .htaccess ...
If you want to redirect your users to HTTPS at all times, send them there from the "entry point" (the first link to...
Read more >
How to redirect HTTP to HTTPS Using .htaccess
Redirecting HTTP to HTTPS · 1. Redirect All Web Traffic. If you have existing code in your .htaccess, add the following: · 2....
Read more >
Redirect from HTTP to HTTPS - SSLmarket
If you are using the popular Apache Web server, you can easily redirect all traffic from unsecured HTTP to HTTPS. When a visitor...
Read more >
How (and Why) to Redirect HTTP to HTTPS for WordPress
After your SSL certificate is available to use, you'll next want to change your WordPress admin area to HTTPS. To do this, all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found