<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.3">
</HEAD>
<BODY>
Hi Ryan<BR>
<BR>
We use varnish for proxying one of our larger websites and we had a similar problem with IP addressing when we first installed it. To get the correct IP address, you need to add the following varnish configuration:<BR>
<BR>
sub vcl_recv {<BR>
remove req.http.X-Forwarded-For;<BR>
}<BR>
<BR>
It looks a bit non-sensical but it worked for us!<BR>
<BR>
All the best,<BR>
<BR>
Justin<BR>
<BR>
On Sun, 2009-07-26 at 12:10 +0800, Ryan Chan wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<BR>
<FONT COLOR="#000000">Hello,</FONT><BR>
<BR>
<FONT COLOR="#000000">I have serveral web sites running on Apache/PHP, I want to install a Transparent Reverse Proxy (e.g. squid, varnish) to cache the static stuff. (By looking at expire or LM resposne header)</FONT><BR>
<BR>
<FONT COLOR="#000000">However, one of my requirements is that neither client (browser) or server (Apache/PHP) is aware of existences of that proxy.</FONT><BR>
<BR>
<FONT COLOR="#000000">E.g.</FONT><BR>
<BR>
<FONT COLOR="#000000">Client will not see header such as via, age etc.</FONT><BR>
<FONT COLOR="#000000">Server will not see header such as X-Forwarded-For</FONT><BR>
<BR>
<FONT COLOR="#000000">I want to ask: Is it possible to do the above stuffs using varnish?</FONT><BR>
<BR>
<FONT COLOR="#000000">Thanks.</FONT><BR>
<BR>
<PRE>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">varnish-misc mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:varnish-misc@projects.linpro.no">varnish-misc@projects.linpro.no</A></FONT>
<FONT COLOR="#000000"><A HREF="http://projects.linpro.no/mailman/listinfo/varnish-misc">http://projects.linpro.no/mailman/listinfo/varnish-misc</A></FONT>
</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
--
Redwire Design Limited
54 Maltings Place
169 Tower Bridge Road
London SE1 3LJ
<A HREF="http://www.redwiredesign.com">www.redwiredesign.com</A>
[ 020 7403 1444 ] - voice
[ 020 7378 8711 ] - fax
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>