nginx 域名转发 conf 配置 反向代理

server {
    listen 80;
    server_name share.xiaoguan.net;
    index index.html index.htm index.php;
    root /www/wwwroot/share;
    location ^~ /zufang/ {
        proxy_pass http://zufang.xiaoguan.net/;
   }
}


比如 访问 http://share.xiaoguan.net/zufang/ 就会转发到 http://zufang.xiaoguan.net/