nginx的全网代理配置
八月 20th, 2009 Posted in Nginx | 阅读次数: 216 次
文章来自ayou http://nginx.cn
location /get/
{
set $hostx “”;
set $addrs “”;
if ( $uri ~ “^/get/http./+([^/]+)/(.+)$”) {
set $hostx $1;
set $addrs $2;
}
resolver 127.0.0.1;
proxy_pass http://$hostx/$addrs;
proxy_set_header referer “http://$hostx”;
}
这个配置可以代理互联网上的所有http页面/图片,并且可越过一般的防盗链限制。
访问方法:http://www.sudone.com/get/http://www.google.com/tools/dlpage/res/chrome/images/chrome-205_noshadow.png
因为nginx不会自动读取系统的dns去解析域名,所以需要定义一个resolver作为dns服务器。
注,为了减少“麻烦”,我并没有将此功能部署到正式场合
五月 9th, 2011 at 22:00
Recommended Sites…
[...]below you can check out my recommended links page http://www.yeastinfectiontreatmentcure.net/links/ with some excellent websites that I think you should definitely go visit[...]…
六月 3rd, 2011 at 02:50
Related Websites…
[...]here are some other links to sites that we find everyday so here are some popular sites we like today[...]…
八月 18th, 2011 at 08:40
You should check this out……
[...] Wonderful story, reckoned we could combine a few unrelated data, nevertheless really worth taking a look, whoa did one learn about Mid East has got more problerms as well [...]………
十一月 27th, 2011 at 10:44
WOW! check this out!……
Amazing Post, worth a read……