Proxy/SSL config with Let's Encrypt breaks app
See original GitHub issueI’m trying to add SSL to my app via Let’s Encrypt, but I’m running into quite a few issues.
Mup version
1.4.3
Mup config
{
"servers": {
"one": {
"host": "1.2.3.4",
"username": "root",
"password": "password"
}
},
"proxy": {
"domains": "zenshome.jp,www.zenshome.jp",
"ssl": {
"crt": "./fullchain.pem",
"key": "./privkey.pem"
}
},
"app": {
"name": "my-app",
"path": "../../",
"servers": {
"one": {}
},
"buildOptions": {
"serverOnly": true
},
"env": {
"ROOT_URL": "http://host.com",
"MONGO_URL": "mongodb://user:pass@subdomain.subdomain.host.com:15739/zensroom?ssl=true",
"VIRTUAL_HOST": "zenshome.jp,www.zenshome.jp",
"HTTPS_METHOD": "noredirect",
"HTTP_FORWARDED_COUNT": 1
},
"docker": {
"image": "abernix/meteord:node-8.9.1-base",
"prepareBundle": false
},
"deployCheckWaitTime": 120,
"enableUploadProgressBar": true,
"type": "meteor"
}
}
Output of mup status
=> Servers
- 128.199.170.128: Ubuntu 16.04
=> Docker Status
- 128.199.170.128: 17.11.0-ce Running
=> Meteor Status
- 128.199.170.128: running
Created at 2018-03-07T00:26:05.638159659Z
Restarted 0 times
ENV:
- ROOT_URL=http://zenshome.jp/
- MONGO_URL=xxx
- VIRTUAL_HOST=zenshome.jp,www.zenshome.jp
- HTTPS_METHOD=noredirect
- HTTP_FORWARDED_COUNT=1
- METEOR_SETTINGS={...}
- PORT=80
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- METEORD_DIR=/opt/meteord
- NODE_VERSION=8.9.1
Exposed Ports:
- 80/tcp
App available through reverse proxy
- Available in app's docker container: true
=> Reverse Proxy Status
- 128.199.170.128:
- NGINX:
- Status: Stopped
- Let's Encrypt
- Status: Stopped
Issue
As soon as I uncomment the proxy
block in mup.js
, my app stops working entirely. The GraphQL endpoint at http://zenshome.jp/graphql becomes unaccessible, both using http
and https
. If I comment out proxy
everything goes back to normal.
Even if I have bad SSL certs or a bad config I would guess it should only show a warning? Is it normal for the app to go down completely? In other words curl zenshome.jp
just gives me:
Failed to connect to zenshome.jp port 80: Connection refused
I should also mention that I experienced issues with Cloudflare’s SSL (see https://github.com/zodern/meteor-up/issues/819) although I don’t think it can be related?
Issue Analytics
- State:
- Created 6 years ago
- Comments:17
Top Results From Across the Web
SSL Encryption at ProxySQL Part 1
This blog covers how to integrate ProxySQL Backend SSL with MySQL to use an encrypted connection. ProxySQL instance. Enable Encryption on MySQL.
Read more >App not connecting to MySQL database after installing certs
Once LetsEncrypt was installed and haproxy config file updated to use the certs, the app is launching using https but is NOT connecting...
Read more >How to Configure MySQL SSL With Public Certificates - Percona
The first step is to get MySQL using the certificates. For simplicity I've just removed the old certificates from the server <data_dir> (I...
Read more >PKIX path building failed - on valid let's encrypt certificate
I noticed that when it couldn't find the valid certificate, I'd get: SEVERE: I/O Exception javax.net.ssl.SSLHandshakeException: . However, when ...
Read more >Using MySQL Workbench to Connect Through ProxySQL
We only want to make minimal configuration changes, so let's start with the trying the first option. After clicking “Test Connection” and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For me simply running
mup stop
beforemup setup
andmup deploy
did the trick.OK so I don’t know if this is the “proper” way, but this is what I did that worked (using the custom certificates technique):
sudo certbot certonly
.zip
andscp
the resulting certs directory back to your localmup
folder.fullchain.pem
andprivkey.pem
files, and then fill in theproxy
section ofmup.js
.forceSSL: true
in yourproxy.ssl
block.https
to your root URL.mup setup
.mup deploy
.I’m not sure if you actually need to run
sudo certbot certonly
on your server or if you can do it locally, but it seemed like doing it on your server saves a verification step.