Nginx动态代理

时间:2013-03-01 11:48:08

标签: nginx

您好我想为nginx设置动态代理..

location /X/Y{
    proxy_pass   http://X:Y;
    proxy_redirect          off;
    proxy_next_upstream     error timeout invalid_header http_500;
    proxy_connect_timeout   1;
    }

现在当用户提出请求时

“'http://com.mypc/com.test/8181”nginx需要将其重定向到“http://com.test:8181

请帮助我,以便我可以解决问题

1 个答案:

答案 0 :(得分:0)

您可能需要编写nginx负载均衡器模块。 ngx_http_upstream_ip_hash_module.c做了类似的事情,所以你可能想从它开始。

Nginx模块编写指南:http://www.evanmiller.org/nginx-modules-guide.html

相关问题