nginx 根据域名转发本机端口

server { 
    listen 80;
    listen [::]:80;
    server_name xxxx.com
    location / { 
        proxy_pass http://127.0.0.1:8080;
    }
}
server { 
    listen 80;
    listen [::]:80;
    server_name xxxx.com
    location / { 
        proxy_pass http://127.0.0.1:7080;
    }
}
    原文作者:寻绾
    原文地址: https://blog.csdn.net/wancongconga/article/details/124279297
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞