/ Zope / Apsis / Pound Mailing List / Archive / 2009 / 2009-03 / redirecting to https with pound

[ << ] [ >> ]

[ Re: [Pound Mailing List] Pound on pfSense? / ... ] [ Using URL matching to distribute to different ... ]

redirecting to https with pound
Sebastiaan van Erk <sebster(at)sebster.com>
2009-03-02 17:48:31 [ FULL ]
Hi,

I'm trying to achieve the equivalent of:

# Redirect to https
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

I'm using pound to terminate a bunch of https sites (I have a wildcard 
cert). I know I can constantly add a new line for each new site, but I 
was wondering if I could reproduce the above hostname independent 
method, perhaps using wildcard captures or something; ideally something 
like this:

   Service
     HeadRequire "^Host:\s(.*)\.sebster\.com"
     Redirect "https://$1.sebster.com"
   End

Regards,
Sebastiaan
Attachments:  
smime.p7s application/x-pkcs7-signature 3328 Bytes

Re: [Pound Mailing List] redirecting to https with pound
"(private) HKS" <hks.private(at)gmail.com>
2009-03-02 19:03:10 [ FULL ]
On Mon, Mar 2, 2009 at 11:48 AM, Sebastiaan van Erk
<sebster(at)sebster.com> wrote:[...]

I asked an almost identical question on 2009-02-20, and have yet to
receive a reply. I'm guessing this isn't possible.
http://www.apsis.ch/pound/pound_list/archive/2009/2009-02/1235167438000#1235167438000

-HKS

Re: [Pound Mailing List] redirecting to https with pound
Dave Steinberg <dave(at)redterror.net>
2009-03-02 19:09:18 [ FULL ]
(private) HKS wrote:[...][...][...]

Not currently possible AFAIK.  OTOH, add a custom header in your https 
service (such as "X-Forwarded-Proto: https") and then do the check for 
that in apache, and you can use a mod_rewrite snippit similar to whats 
above.
[...]

Re: [Pound Mailing List] redirecting to https with pound
Sebastiaan van Erk <sebster(at)sebster.com>
2009-03-09 08:06:54 [ FULL ]
Dave Steinberg wrote:[...][...]
>>> Hi,
>>>
>>> I'm trying to achieve the equivalent of:
>>>
>>> # Redirect to https
>>> RewriteEngine on
>>> RewriteCond %{HTTPS} off
>>> RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
>>>
>>> I'm using pound to terminate a bunch of https sites (I have a
wildcard
>>> cert). I know I can constantly add a new line for each new site,
but 
>>> I was
>>> wondering if I could reproduce the above hostname independent
method,
>>> perhaps using wildcard captures or something; ideally something
like 
>>> this:
>>>
>>>  Service
>>>    HeadRequire "^Host:\s(.*)\.sebster\.com"
>>>    Redirect "https://$1.sebster.com"
>>>  End
>>>
>>> Regards,
>>> Sebastiaan
>>>[...][...]

That's a nice trick when using Apache on the backend, thanks. :-)

Regards,
Sebastiaan
Attachments:  
smime.p7s application/x-pkcs7-signature 3328 Bytes

MailBoxer