Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Running Plack application behind an HTTPS reverse proxy
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gurunandan Bhat  
View profile  
 More options Oct 22 2012, 3:51 pm
From: Gurunandan Bhat <bhat.gurunan...@gmail.com>
Date: Mon, 22 Oct 2012 12:51:14 -0700 (PDT)
Local: Mon, Oct 22 2012 3:51 pm
Subject: Running Plack application behind an HTTPS reverse proxy

Hi,

I am attempting to run a CGI application wrapping it by
Plack::App::WrapCGI. The application runs fine and as expected.
However when hosted behind a secure Apache reverse proxy some of the calls
continue to try to connect to http rather than https.
I remember reading somewhere that this can be fixed by passing the correct
X-* header but could not locate it when I need it most.

Would really appreciate if someone here could tell me how to ensure that
the wrapped application always connects to the secure post

Thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ævar Arnfjörð Bjarmason  
View profile  
 More options Oct 23 2012, 3:08 pm
From: Ævar Arnfjörð Bjarmason <ava...@gmail.com>
Date: Tue, 23 Oct 2012 21:08:12 +0200
Local: Tues, Oct 23 2012 3:08 pm
Subject: Re: Running Plack application behind an HTTPS reverse proxy
On Mon, Oct 22, 2012 at 9:51 PM, Gurunandan Bhat

<bhat.gurunan...@gmail.com> wrote:
> I am attempting to run a CGI application wrapping it by Plack::App::WrapCGI.
> The application runs fine and as expected.
> However when hosted behind a secure Apache reverse proxy some of the calls
> continue to try to connect to http rather than https.
> I remember reading somewhere that this can be fixed by passing the correct
> X-* header but could not locate it when I need it most.

They continue to connect to what? When you're running behind a proxy
it should be mostly transparent to the application, what is it trying
to connect to exactly? Can you be more specific and provide error
messages, logs etc.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Stockdale  
View profile  
 More options Oct 23 2012, 9:57 pm
From: Robert Stockdale <robert.stockd...@gmail.com>
Date: Tue, 23 Oct 2012 21:41:36 -0400
Local: Tues, Oct 23 2012 9:41 pm
Subject: Re: Running Plack application behind an HTTPS reverse proxy

Are you using the ReverseProxy middleware?
On Oct 23, 2012 3:08 PM, "Ævar Arnfjörð Bjarmason" <ava...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gurunandan Bhat  
View profile  
 More options Oct 24 2012, 12:38 am
From: Gurunandan Bhat <bhat.gurunan...@gmail.com>
Date: Tue, 23 Oct 2012 21:38:48 -0700
Local: Wed, Oct 24 2012 12:38 am
Subject: Running Plack application behind an HTTPS reverse proxy

On Tue, Oct 23, 2012 at 12:08 PM, Ævar Arnfjörð Bjarmason
<ava...@gmail.com>wrote:

Apologies - I dont have access to the logs right now - but here is what
happens:

   1. I am trying to run Bugzilla under PSGI/Plack using the startup script
   here: https://gist.github.com/3933301
   2. All parts of the application run as expected when I access the
   application at http://<hostname>:5000/
   3. I now configure mod_proxy and mod_ssl (Apache 2.4) as a reverse proxy
   and access the application at https://<secure-hostname>/
   4. Most URLs work as expected except a few (possibly internal redirects
   - but I am not sure) that try to look for
http://<secure-hostname>/<path_info>
   and since no application is running on 80, I get a "page not found"

What must I do to ensure that all links in the the application point to the
secure port?

Thank you,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michiel Beijen  
View profile   Translate to Translated (View Original)
 More options Oct 24 2012, 1:52 am
From: Michiel Beijen <michiel.bei...@gmail.com>
Date: Wed, 24 Oct 2012 07:51:44 +0200
Local: Wed, Oct 24 2012 1:51 am
Subject: Re: Running Plack application behind an HTTPS reverse proxy
Hi,

On Wed, Oct 24, 2012 at 6:38 AM, Gurunandan Bhat

<bhat.gurunan...@gmail.com> wrote:
> Most URLs work as expected except a few (possibly internal redirects - but I
> am not sure) that try to look for http://<secure-hostname>/<path_info> and
> since no application is running on 80, I get a "page not found"

> What must I do to ensure that all links in the the application point to the
> secure port?

Because you already suspect it are internal redirects, and because you
did not mention this explicitly, did you set bugzilla's sslbase and
urlbase parameters correctly?

http://www.bugzilla.org/docs/tip/en/html/parameters.html
--
Michiel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gurunandan R. Bhat  
View profile  
 More options Oct 24 2012, 3:19 am
From: "Gurunandan R. Bhat" <bhat.gurunan...@gmail.com>
Date: Wed, 24 Oct 2012 00:19:08 -0700
Local: Wed, Oct 24 2012 3:19 am
Subject: Re: Running Plack application behind an HTTPS reverse proxy
On 10/23/2012 10:51 PM, Michiel Beijen wrote:

I did set urlbase to the secure link https://<secure-hostname>/.
I tried setting sslbase to the secure host (https://....) but that does
not make any difference. So I unset it
If I understand it correctly, Bugzilla uses the url base only to
generate links embedded inside emails.

I have used native Dancer framework based applications extensively
behind secure proxies and in that case too I had the same problem. I
solved the problem there (in native Dancer applications) by setting
behind_proxy to "true" and setting $ENV{'X-FORWARDED-PROTOCOL'} to
"https" and everything works fine. Can something analogous be done for
legacy applications wrapped inside Plack/PSGI?

Thank you once again for your interest.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »