我一直在尝试将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我在这里做错了什么?
发布于 2019-12-10 15:10:27
你应该配置nginx来做代理和配置ssl\redirection等。this part详细介绍了这一点。但原则上这是您应该使用nginx (在nginx配置文件中)而不是ACI来做的事情。
您最好在服务器故障时询问nxing配置问题。
https://stackoverflow.com/questions/59260360
复制相似问题