我正在尝试在一台VPS机器上运行两个Meteor应用程序,使用与Meteor一起的反向代理设置。根据mup的说法,一切正常,但是,我只能加载其中一个网站。两个网站都独立运行在不同的VPS机器上,当我使用MUP将应用程序部署到同一个服务器上时没有错误。
我已将两个DNS都设置为同一服务器
11.11.11.111
,这就是问题所在。端口80和443打开。
不加载的网站状态
Your connection is not private
.
这是我的MUP文件。
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: 'me@app1.com',
forceSSL: true
}
}
};
APP2:
J.J.
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: 'me@app1.com',
forceSSL: true
}
}
};
更新
=> 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