Thanks Robert, I'll give that a try!
________________________________ From: Robert Segall <[email protected]> To: [email protected] Sent: Tue, September 21, 2010 5:14:42 AM Subject: Re: [Pound Mailing List] How to Write 2 Config Rules - for Domain and a Subdirectory of? On Sun, 2010-09-19 at 21:10 -0700, Bsd Frmusr wrote: > How is a listener/service/backend written in pound.cfg to listen for a > subdirectory of a domain - not a subdomain? > I see on the http://www.apsis.ch/pound/ examples for subdomains (s1 to s4), > but > > can't find examples for subdirectories. > Would I use Address or HeadRequires to listen for >http://www.domain.com/subdir1? > I can't test now, but am asking for future use. > > I need to create 2 rules to allow user to be able to enter either: > a) domain.com > or > b) domain.com/subdir > with or without http://, www., or trailing / > > and end up at either: > a) 192.168.1.124/ > or > b) 192.168.1.124/subdir1 > > Here's a couple of attempts at the second rule - for the subdirectory, please > correct me. > For example, 192.168.1.123 is mapped to a public IP address and domain.com > > 1. Using Address: > > ListenHttp > Address 192.168.1.123/subdir1 > Port 8080 > Service > BackEnd > Address 192.168.1.124/subdir1 > Port 80 > End > End > End > > or (???) : > > 2. Using HeadRequires: > > ListenHttp > Address 192.168.1.123 > Port 8080 > Service > HeadRequire "Host: domain.com/subdir1" > BackEnd > Address 192.168.1.124/subdir1 > Port 80 > End > End > End > > Am I getting close? > > If someone would be gracious enough to quickly edit my attempts above to show > how to write rule for domain.com and domain.com/subdir1, I would be very > happy > (and less confused!;-) You need to use the URL directive. Try one URL with "^/[^/]*$" and a second one with "^/subdir1/[^/]*$". They need to be in separate Services. -- Robert Segall Apsis GmbH Postfach, Uetikon am See, CH-8707 Tel: +41-32-512 30 19 -- To unsubscribe send an email with subject unsubscribe to [email protected]. Please contact [email protected] for questions. -- To unsubscribe send an email with subject unsubscribe to [email protected]. Please contact [email protected] for questions.
