On Fri, Jul 1, 2011 at 5:35 PM, David Theis <[email protected]>wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi everybody, > > i'm getting right to my question: > if a user contacts one of our proxy servers using only the ip address > i'd like to rewrite this ip address into a domain name, so that the user > sees www.domainname.de instead of e.g 10.0.0.2 in his/her browser > address bar. is this possible with varnishd ? > > We're using freebsd-7.4-RELEASE + varnish 2.1.5 ! > > mfg > David > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.17 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk4NuA0ACgkQu/Z5Qo6690XlYACgj2or4DFsYSxMiAUPoTRjr9y0 > xWQAoJSW112qam6BUixSZjwEibsLMLY0 > =hw0m > -----END PGP SIGNATURE----- > > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > in vcl_recv if (req.http.host ~ "11.22.33.44"){ error 750 "http://www.domain.com"; } sub vcl_error { if (obj.status == 750) { set obj.http.Location = obj.response req.url; set obj.status = 301; return(deliver); } } -- Shib
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
