On 5/27/2011 2:06 AM, Malcolm Haak wrote:
Hi,

So what I am trying to achieve is we have several sub-domains and some are
on one server and the rest are on another.
As such my pound config was similar to this

                ListenHTTP
                   Address y.y.y.y
                   Port    80


                   Service
                        HeadRequire "Host: .*.subdomain1.tld.com.au.*"

                        BackEnd
                                Address z.z.z.z
                                Port 80
                        End

                    End

                   Service
                        HeadRequire "Host: .*.subdomain2.tld.com.au.*"

                        BackEnd
                                Address z.z.z.z
                                Port 80
                        End

                    End
                   Service
                        HeadRequire "Host: .*.subdomain3.tld.com.au.*"

                        BackEnd
                                Address z.z.z.z
                                Port 80
                        End

                    End


                   Service
                        HeadRequire "Host: .*tld.com.au.*"

                        BackEnd
                                Address x.x.x.x
                                Port 80
                        End

                    End

               End

Unfortunately this does not work.
The defined sub-domains do but undefined ones on the tld.com.au server
don’t.

Any ideas? I'm stumped. If I remove the specified sub-domains then all of
them go to the tld.com.au server fine.

Having this simplifies our config and DNS config to no end.

This basic structure looks correct to me (I do similar things in my config). I'd guess your regular expressions are too broad, so you are catching the 'fallback' subdomains where you don't intend to.

Also - you don't technically need a HeadRequire directive on the 'fallback' service block - the fact that the DNS has sent the request to that IP and you haven't matched an earlier block is sufficient, and it probably makes the intent clearer to anyone reading the config.

Regards,
--
Dave Steinberg
http://www.geekisp.com/
http://www.steinbergcomputing.com/
http://www.redterror.net/

--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.

Reply via email to