第一种

直接在主ngin.conf中进行配置:

nginx教程:upstream的两种配置方式_服务器

第二种

单独写到一个 a.conf文件中,然后将a.conf放置到 /etc/nginx/conf.d路径下。
a.conf:

upstream xxx.com {
        hash $remote_addr consistent;
        server 172.xx.xx.xx:8069;
    }