nginx下如何增加域名的多个端口监听

问答中心分类: Linuxnginx下如何增加域名的多个端口监听
hongenhui asked 6年 ago
使用的是nginx环境,开启了socket,需要开启一个对应端口,请问在一个域名下,如何新增端口监听。

1 Answers
oneinstack answered 6年 ago
/usr/local/nginx/conf/vhost/www.example.com.conf新增:

Listen new_port;