azure - 在 Azure 容器服务中启用 SSL 端点
问题描述
我一直在尝试将 SSL 端点添加到托管在 azure 容器服务上的应用程序中。我在关注文章
本文适用于托管在端口 80 上的应用程序。文章说只打开 443 端口,但我的应用程序在这种情况下没有运行(我的应用程序托管在 8000 上)。当我打开 8000 时,没有添加任何 SSL 端点。
我的 Deployment.yaml 文件是
api-version: 2018-10-01 location: eastus name: starter properties: containers:
- name: nginx-with-ssl
properties:
image: nginx
ports:
- port: 443
protocol: TCP
resources:
requests:
cpu: 1.0
memoryInGB: 1.5
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx
- name: xxx
properties:
environmentVariables:
image: xxx
ports:
- port: 8000
protocol: TCP
resources:
requests:
cpu: 1.0
memoryInGB: 4
volumes:
- secret:
ssl.crt: xxx
ssl.key: xxx
nginx.conf: xxx
name: nginx-config imageRegistryCredentials:
- server: xxx
username: xxx
password: xxx ipAddress:
ports:
- port: 443
protocol: TCP
dnsNameLabel: xxx
type: Public
osType: Linux tags: null
type: Microsoft.ContainerInstance/containerGroups
我在这里做错了什么?
解决方案
您应该配置 nginx 来执行代理和配置 ssl\redirection 等。这部分详细介绍了这一点。但原则上这是你应该用 nginx(在你的 nginx 配置文件中)做的事情,而不是用 ACI。
您最好询问有关服务器故障的 nxing 配置问题。
推荐阅读
- javascript - JavaScript:从表单中获取价值
- android - 类似于 HelloAR 示例的 Sceneform 平面渲染
- angular - 在 HTTP 调用中未找到表单数据
- android - 无法停止 Firebase JobDispatcher 服务
- session - 在选项卡之间保存浏览器会话
- ruby - Ruby 方法在执行条件后返回 nil 值
- php - 如何使用 typedata 以 HTML 列表格式打印 JSON REST api 数据
- c# - MVC 传递给 LEFT 或 SUBSTRING 函数的长度参数无效
- spring-boot - Jhipster 上下文路径更改
- javascript - Javascript:var等于传入相同var的函数