/ Zope / Apsis / Pound Mailing List / Archive / 2008 / 2008-01 / How to match a blank URL

[ << ] [ >> ]

[ Status of Pound-2.3.2 X-SSL-certificate ... ] [ Killing a Session / Al Napp ... ]

How to match a blank URL
Pete DeLaurentis <pete(at)nextengine.com>
2008-01-29 21:58:07 [ FULL ]
Hi guys,

I'm using Pound as a load balancer, and I'm trying to route two URLs  
of the format:

service.company.com/  and service.company.com

to a certain IP address 1.2.3.4.  I want all the other URL syntaxes  
(there are about 20 varieties) to go through to our old system on  
1.2.3.5

Does anyone know how to do this?  I tried the following script, but it  
ended up routing everything to the new IP address 1.2.3.4.

Thanks for the help!
Pete

         Service
                 URL "/"
                 Session
                         Type BASIC
                         TTL 300
                 End
                 BackEnd
                         Address 1.2.3.4
                         Port 80
                 End
         End
         Service
                 Session
                         Type BASIC
                         TTL 300
                 End
                 BackEnd
                         Address 1.2.3.5
                         Port 80
                 End
         End
Attachments:  
text.html text/html 2753 Bytes

Re: [Pound Mailing List] How to match a blank URL
"Lorenzo Grio" <lorenzo.grio(at)gmail.com>
2008-01-30 10:21:34 [ FULL ]
I think you can use HeadRequire (exists also HeadDeny) option, which
accepts regular expressions.
I am not an expert about reg ex, but you can try something like this:

HeadRequire "Host: .*service\.company\.(com|com/)"

Regards,
Lorenzo.

Re: [Pound Mailing List] How to match a blank URL
tyntas <nospam2(at)delfi.lt>
2008-01-30 11:18:15 [ FULL ]
Hi Pete,

if I understood well, you need one server to handle root of the site 
like front-page, and all the rest of the pages you want to be handled by 
other server. Afaik, setups like this are used by some local web 
portals, which have a large hit ratio to their front page which needs to 
be set up differently at the backend.

I guess that there might be a problem with Lorenzo's offer, as 'Host' 
header does not differ when different url's are accessed, so you should 
actually check URL.

I would try these patterns:
--- cut ---
Service
	URL "^/?$"
#	...backend #1 definition...
End
Service
	URL "^/.+"
#	...backend #2 definition...
End
--- cut ---

first pattern tells, that there might be only '/' in the url or the 
empty one, and a second one tells that there should be '/' and at least 
one more sharacter after it to match the pattern.

Correct me someone if I'm wrong.

j.

Lorenzo Grio rašė:[...]

Re: [Pound Mailing List] How to match a blank URL
Pete DeLaurentis <pete(at)nextengine.com>
2008-01-30 18:07:55 [ FULL ]
Thanks for the tip - I'll write back and let you guys know if this  
works.

I wasn't aware that the URL string took regular expressions - that's  
really exciting news!

-Pete

On Jan 30, 2008, at 2:18 AM, tyntas wrote:
[...][...][...]

MailBoxer