On Thu, Jan 22, 2009 at 06:49:16AM -0800, J. Shirley wrote: > On Thu, Jan 22, 2009 at 3:21 AM, Terence Monteiro > <[email protected]> wrote: > > I'm running a Catalyst application on port x behind varnish on 80 for > > caching. Whenever I call c.req.base or c.uri_for, I get the backend > > server port as a result. I tried setting the using_frontend_proxy option > > in my config, but still I get the backend port. > > > > I searched the mailing list and found and old thread from 2005, > > > > http://www.gossamer-threads.com/lists/catalyst/users/1595?search_string=req%20base;#1595 > > > > but can anyone tell me what is the currently the best approach to be > > used? My apache version is 2.2.8-1ubuntu0.3, mod_perl version is > > 2.0.3-2ubuntu2. > > > > Just so I get what you are saying, you have Varnish -> Apache -> > Mod_Perl -> Catalyst? >
That's right. > If so, you probably just need to set the X-Forwarded-Host parameter in > Varnish to your frontend domain. In your VCL, add this: > > set req.http.X-Forwarded-Host = "mysite.com"; > Thanks a lot. That did the trick. I gave the above with my frontend port in my vcl config in the vcl_recv subroutine. > I have a Varnish setup here, and it seems to setup everything so I > haven't needed the using_frontend_proxy flag. > > -J > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ -- Thanks and Regards, Terence Monteiro. DeepRoot Linux, http://www.deeproot.in Ph: +91 (80) 4089 0000 Getting GNU/Linux to work for you. Faster. Better. Today. Every way _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
