- 打开
nginx
配置文件conf/nginx.conf
带
+
的新增的配置项
server{
listen 80;
server_name www.duans.top ;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.duans.top;
# 配置反向代理: 表示将以/api开头的请求转发到目标地址上
# 如果有多组转发规则, 则配置多个location配置节点即可
+location /api {
+proxy_pass http://rap2.taobao.org:38080/app/mock/245095/;
#proxy_set_header Host $host;
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+}
}