nginx 代理端口

    科技2026-04-24  1

    default.conf 文件增加如下内容

    大致意思 拦截 /api开头的请求,并重定向到 http://192.168.1.21:8090 提供的web服务上

    location /api { rewrite ^/api/(.*)$ /$1 break; proxy_pass http://192.168.1.21:8090; }

    原文

    Processed: 0.009, SQL: 10