|
/
Zope
/
Apsis
/
Pound Mailing List
/
Archive
/
2008
/
2008-02
/
Re: [Pound Mailing List] Multiple "Address"-Statements for one service
[
not body! / "AN(at)S" ... ]
[
Load balancing sticking sessions with IP / ... ]
Re: [Pound Mailing List] Multiple "Address"-Statements for one service
smartTERRA NOC <noc(at)smartterra.de> |
2008-02-14 14:42:45 |
[ FULL ]
|
Am 31.12.2007 um 16:31 schrieb Falk Brockerhoff:
I would come back to this topic again. Any hints?
[...]
|
|
|
Re: [Pound Mailing List] Multiple "Address"-Statements for one service
Dave Steinberg <dave(at)redterror.net> |
2008-02-14 16:25:45 |
[ FULL ]
|
>> I would like to use pound for serving several domains. These domains
do[...]
What I do is I have plenty of address blocks defined without services,
then I define service blocks below all this so by default, all the
addresses "fall through" to the common service blocks (which operate on
a first-match basis). Its a little bit like firewall rules in some ways.
Then if I need to override something for a particular IP, I define
address-specific service blocks. Its all a little on the verbose side,
but not too bad. You could probably write a short script in your
language of choice to automate the common stuff.
HTH,[...]
|
|
|
Re: [Pound Mailing List] Multiple "Address"-Statements for one service
smartTERRA NOC <noc(at)smartterra.de> |
2008-02-19 15:08:05 |
[ FULL ]
|
Am 14.02.2008 um 16:25 schrieb Dave Steinberg:
[...]
Hm, can you please poste an example of your configuration?
[...]
Rgs,
Falk
|
|
|
Re: [Pound Mailing List] Multiple "Address"-Statements for one service
Dave Steinberg <dave(at)redterror.net> |
2008-02-19 16:00:31 |
[ FULL ]
|
smartTERRA NOC wrote:[...][...][...]
Sure. This is somewhat abbreviated, but illustrates the idea:
User "proxy"
Group "proxy"
RootJail "/var/pound"
Alive 15
TimeOut 120
LogLevel 5
Daemon 1
Control "/tmp/pound.sock"
DynScale 0
### http defs
ListenHTTP
# XYZ.com
Address 216.168.135.X
Port 80
RewriteLocation 0
HeadRemove "X-Forwarded-Proto"
end
ListenHTTP
# XYZ2.com
Address 216.168.135.Y
Port 80
RewriteLocation 0
HeadRemove "X-Forwarded-Proto"
end
ListenHTTP
# XYZ3.com
Address 216.168.135.Z
Port 80
RewriteLocation 0
HeadRemove "X-Forwarded-Proto"
end
<snip ... more ListenHTTP directives>
ListenHTTPS
# XYZ.com
Address 216.168.135.X
Port 443
Cert "/etc/ssl/pems/www.XYZ.com-pem"
AddHeader "X-Forwarded-Proto: https"
NoHTTPS11 2
RewriteLocation 0
end
ListenHTTPS
# XYZ2.com
Address 216.168.135.Y
Port 443
Cert "/etc/ssl/pems/XYZ2.com-pem"
AddHeader "X-Forwarded-Proto: https"
NoHTTPS11 2
RewriteLocation 0
end
ListenHTTPS
# www.XYZ3.com
Address 216.168.135.Z
Port 443
Cert "/etc/ssl/pems/www.XYZ.com-pem"
AddHeader "X-Forwarded-Proto: https"
NoHTTPS11 2
RewriteLocation 0
end
<snip ... more listenhttps directives>
Service
HeadRequire "Host: tmda.geekisp.com"
Redirect "https://www.geekisp.com/cgi-bin/tmda.cgi"
end
Service
HeadRequire "Host: sqmail.geekisp.com"
Redirect "https://www.geekisp.com/sqmail/"
end
<snip ... more redirect directives>
## temporary - hopefully
Service "ABC.org"
HeadRequire "Host: (www\.)?ABC\.org"
Backend
Address backend-1
Port 80
End
End
<snip ... more site-specific configurations>
#### the default service handler
Service "default"
Backend
Address backend-1
Port 80
end
Backend
Address backend-2
Port 80
end
end
That's it!
[...]
|
|
|
Re: [Pound Mailing List] Multiple "Address"-Statements for one service
smartTERRA NOC <noc(at)smartterra.de> |
2008-02-19 16:28:20 |
[ FULL ]
|
Am 19.02.2008 um 16:00 schrieb Dave Steinberg:
[...]
Ah, perfect. Hm, quite a lot of configuration lines. But this works
without modifying the source code :)
Thank you!
[...]
Rgs,
Falk
|
|
|
Re: [Pound Mailing List] Multiple "Address"-Statements for one service
Dave Steinberg <dave(at)redterror.net> |
2008-02-19 17:38:54 |
[ FULL ]
|
smartTERRA NOC wrote:[...][...][...]
Yes, its not the most compact format in the world, but its relatively
easy to read and its very clear which IPs have specific settings and all
that.
If you had a really large range of IPs, like an entire /24 or bigger,
you could probably write a small program to generate your pound.conf
file. I wrote one at one point (in Ruby) that took YAML and produced
the conf, but ultimately I abandoned it because it wasn't really saving
me anything. It was probably around 100-150 LOC.
Ultimately if you were interested in extreme brevity you could write
some compact data structure to represent your conf and then make a small
program to do the transformation. It ain't rocket science! :)
Regards,[...]
|
|
|
|