single IP and domain and multiple backens

Per Buer perbu at varnish-software.com
Sat Nov 17 10:48:30 CET 2012


Hi Reinhard,


On Sat, Nov 17, 2012 at 8:11 AM, Reinhard Trompetter <trompetter at titandsl.de
> wrote:

>
> Is the following setup feasible (and if so, what would the VCL look like):
>
> 1. "www.medmoodle.de" (with public IP adress) from the internet to my
> router
>

Yes. But this hasn't really much to do with Varnish. :-)

2. When a request is made to "www.medmoodle.de/moodle" varnish sends the
> request to the url "www.medmoodle.de/moodle" on private IP 192.168.1.x
>

in vcl_recv:

if (req.url ~ "^/moodle") {
   set req.backend = moodle;

3. When a request is made to "www.medmoodle.de/drupal" varnish sends the
> request to the url "www.medmoodle.de/drupal" on private IP 192.168.1.y
>


} else if (req.url ~ "^/drupal") {
  set req.backend = drupal;
}

You need to define two backends. Please see the tutorial or "man vcl" for
information on how to do this.



-- 
 <http://www.varnish-software.com/> *Per Buer*
CEO | Varnish Software AS
Phone: +47 958 39 117 | Skype: per.buer
We Make Websites Fly!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20121117/0853ba4c/attachment.html>


More information about the varnish-misc mailing list