On 2/22/2011 5:56 AM, Andrzej 'The Undefined' Dopierała wrote:
Hello.
My configuration:
few sites with ssl:
panel1.domain1.org
panel2.domain1.org
panel3.domain1.org
panel4.domain1.org

(all domain1 on single ip with one wildcard ssl certficate)
panel1.domain2.org
panel2.domain2.org
panel3.domain2.org
panel4.domain2.org
(all domain2 on single ip with one wildcard ssl certficate)

etc.

all ssl traffic should be forwarded to 2 backend apache servers - where
all panel1.* goes to one directory, all panel2.* goes to another
directory etc.

It's working.

But now - i would like to redirect (302) connection incoming on
http://xxx/ to https://xxx - there is no need to forward it ino backend
servers - I would like to do it on pound.
Is it possible? In pound configuration is Redirect backend who should do
it, but.. need to specify exact domainname - i can't find any
possibility to use there domainname from request.

Currently i can use small webserver on 80 port which do this work, but -
use pound will be simpler for me.

Inside your ListenHTTP directive, you can setup multiple Service
directives, each one looking for a particular hostname and redirecting.
 So, roughly:

ListenHTTP
        Address ...
        Port ...
        other options ...

        Service "redirect1"
                HeadRequire "^Host:[ \t]*panel1\.domain1\.org$"
                Redirect "https://panel1.domain.org/";
        End
        Service "redirect2"
                HeadRequire "^Host:[ \t]*panel2\.domain1\.org$"
                Redirect "https://panel2.domain.org/";
        End
        ...
End

These follow a "first match wins" policy.

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

--
To unsubscribe send an email with subject unsubscribe to pound@apsis.ch.
Please contact ro...@apsis.ch for questions.

Reply via email to