找到Nginx的配置文件nginx.conf,修改配置,主要添加了proxy_pass参数。
nginx.conf
proxy_pass
#将请求"http:127.0.0.1:80/helloworld" 转向服务器 "http://127.0.0.1:8081" server { listen 80; server_name 127.0.0.1; location /helloworld { proxy_pass http://127.0.0.1:8081; # 表明了所代理的服务器 }