nginx 和 A 服务在一个 docker 网络不是可以直接访问容器名吗?
server {
listen 443 ssl;
listen [::]:443;
server_name 127.0.0.1;
# security
include
nginxconfig.io/security.conf; # 指定 ssl 证书路径
ssl_certificate xxx.com.cn_server.crt;
# 指定私钥文件路径
ssl_certificate_key xxx.com.cn_server.key;
# logging
access_log /var/log/nginx/access.log combined buffer=512k flush=1m;
error_log /var/log/nginx/error.log warn;
# reverse proxy
location / {
proxy_pass http://A:10086;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_redirect off;
include
nginxconfig.io/proxy.conf; }
}