|
/
Zope
/
Apsis
/
Pound Mailing List
/
Archive
/
2010
/
2010-09
/
How to Write 2 Config Rules - for Domain and a Subdirectory of?
[
Still memory leaks? / skunk ... ]
[
How to change rc.d/pound settings default vars ... ]
How to Write 2 Config Rules - for Domain and a Subdirectory of?
Bsd Frmusr <bsdfrmusr(at)yahoo.com> |
2010-09-20 06:10:04 |
[ SNIP ]
|
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!;-)
TIA
|
|
|
|
|
Re: [Pound Mailing List] How to Write 2 Config Rules - for Domain and a Subdirectory of?
Robert Segall <roseg(at)apsis.ch> |
2010-09-20 19:14:42 |
[ SNIP ]
|
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
|
|
|
Re: [Pound Mailing List] How to Write 2 Config Rules - for Domain and a Subdirectory of?
Bsd Frmusr <bsdfrmusr(at)yahoo.com> |
2010-09-21 09:37:19 |
[ SNIP ]
|
Thanks Robert,
I'll give that a try!
________________________________
From: Robert Segall <roseg(at)apsis.ch>
To: pound(at)apsis.ch
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 pound(at)apsis.ch.
Please contact roseg(at)apsis.ch for questions.
|
|
|
|
|
|