2009-07-07 32 views
0

我是Squid的新手,并且正在调查它是否能够完成手头的任务。鱿鱼作为特定网站的代理?

我需要将静态IP的端口80“转置”到具有主机名指针no-ip.com的动态IP上的端口1088。换句话说:

  • somedomain.com有A记录1.2.3.4
  • someotherdomain.com动态A记录(通过no-ip.com更新)
  • 静态IP 1.2.3.4供应由端口80上的代理(如Squid?)访问(http://www.somedomain.com),将请求转发给someotherdomain.com:1088并将其显示为来自1.2.3.4(somedomain.com)。
  • somedomain.com不能用作访问someotherdomain.com之外的其他位置的通用代理;事实上,后端的中继应该对访问somedomain.com的用户透明。

感谢您对此的任何见解!

威乐

+0

SO:所属服务器故障? – 2009-07-07 21:50:11

回答

2

你正在寻找的是一个反向代理,是的,Squid can do that

http_port 1.2.3.4:80 accel defaultsite=www.somedomain.com 
cache_peer someotherdomain.com parent 1088 0 no-query originserver 

Apache可以以及与mod_proxy的:

<VirtualHost 1.2.3.4:80> 
ServerName www.somedomain.com 
DocumentRoot c:/docroot 

ProxyPass/http://someotherdomain.com:1088/ 
ProxyPassReverse/http://someotherdomain.com:1088/ 
</VirtualHost> 
+0

感谢您的信息!很有帮助! – Ville 2009-07-08 06:22:52