Re: [Mojolicious] Reverse Proxy

2019-09-10 Thread Stefan Adams
Thank you both!  I see -- I did misread that bold.  I interpreted it as
several applications through the same *internal* IP/port.  I understand now
that it was referring to the same *visible from the outside* IP/port.

My question has been answered!

On Tue, Sep 10, 2019 at 1:23 AM Dan Book  wrote:

> Most commonly, different nginx servers (the nginx equivalent of Apache
> virtualhosts) will listen on different hostnames, and then proxy to
> different backend applications.
>
> -Dan
>
> On Tue, Sep 10, 2019 at 2:17 AM Stefan Adams  wrote:
>
>> From the Cookbook#Reverse Proxy
>> 
>> :
>>
>> *[A reverse proxy] can provide a lot of benefits, like terminating SSL
>> connections from the outside, limiting the number of concurrent open
>> sockets towards the Mojolicious application (or even using Unix sockets),
>> balancing load across multiple instances, or supporting several
>> applications through the same IP/port.*
>>
>>
>> What steps are necessary to support several applications through the same
>> IP/port?
>>
>> I'm picturing having two separate Mojolicious applications running in two
>> separate system processes, each with their own Perl binary even.  What is
>> necessary to reverse proxy a connection to these two separate apps
>> listening on the same IP/port?  How does the reverse proxy (nginx) know
>> which process should get the request proxied to it?
>>
>> Or am I misunderstanding what is stated in bold above?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Mojolicious" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to mojolicious+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFSkT_YXpnUbakT%3DO%2Bi1y99vVxpg8rVo%3D8V33LUtLhNfPQ%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojolicious/CABMkAVUec9he1116T6Mu%3Dd1ZdAR7Cj_UdaFTxSD%2BrC8wm7UvmQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFT9%2Ba6iLqbjYiym2QhMMXi07vrb9A0yBA1kKxYSc4%3DP3Q%40mail.gmail.com.


Re: [Mojolicious] Reverse Proxy

2019-09-10 Thread Dan Book
Most commonly, different nginx servers (the nginx equivalent of Apache
virtualhosts) will listen on different hostnames, and then proxy to
different backend applications.

-Dan

On Tue, Sep 10, 2019 at 2:17 AM Stefan Adams  wrote:

> From the Cookbook#Reverse Proxy
> 
> :
>
> *[A reverse proxy] can provide a lot of benefits, like terminating SSL
> connections from the outside, limiting the number of concurrent open
> sockets towards the Mojolicious application (or even using Unix sockets),
> balancing load across multiple instances, or supporting several
> applications through the same IP/port.*
>
>
> What steps are necessary to support several applications through the same
> IP/port?
>
> I'm picturing having two separate Mojolicious applications running in two
> separate system processes, each with their own Perl binary even.  What is
> necessary to reverse proxy a connection to these two separate apps
> listening on the same IP/port?  How does the reverse proxy (nginx) know
> which process should get the request proxied to it?
>
> Or am I misunderstanding what is stated in bold above?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFSkT_YXpnUbakT%3DO%2Bi1y99vVxpg8rVo%3D8V33LUtLhNfPQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CABMkAVUec9he1116T6Mu%3Dd1ZdAR7Cj_UdaFTxSD%2BrC8wm7UvmQ%40mail.gmail.com.


Re: [Mojolicious] Reverse Proxy

2019-09-10 Thread Илья Рассадин
Hi! Reverse proxy (such as Nginx) can proxy different requests to the 
different apps based on different params.


For example, you have an application doing auth and application doing 
something only for the authorized users. So domain auth.app.com could be 
proxied to auth app and domain internal.app.com to the second app.


You can do it based on whatever nginx supports - host, location, some 
get args or header in request and so on.


On 10/09/2019 09:16, Stefan Adams wrote:
From the Cookbook#Reverse Proxy 
: 



/[A reverse proxy] can provide a lot of benefits, like terminating
SSL connections from the outside, limiting the number of
concurrent open sockets towards the Mojolicious application (or
even using Unix sockets), balancing load across multiple
instances, *or supporting several applications through the same
IP/port*./


What steps are necessary to support several applications through the 
same IP/port?


I'm picturing having two separate Mojolicious applications running in 
two separate system processes, each with their own Perl binary even.  
What is necessary to reverse proxy a connection to these two separate 
apps listening on the same IP/port?  How does the reverse proxy 
(nginx) know which process should get the request proxied to it?


Or am I misunderstanding what is stated in bold above?
--
You received this message because you are subscribed to the Google 
Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to mojolicious+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFSkT_YXpnUbakT%3DO%2Bi1y99vVxpg8rVo%3D8V33LUtLhNfPQ%40mail.gmail.com 
.


--
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/3878db06-79f7-9958-13f2-93714714849b%40gmail.com.


[Mojolicious] Reverse Proxy

2019-09-10 Thread Stefan Adams
>From the Cookbook#Reverse Proxy
:

*[A reverse proxy] can provide a lot of benefits, like terminating SSL
connections from the outside, limiting the number of concurrent open
sockets towards the Mojolicious application (or even using Unix sockets),
balancing load across multiple instances, or supporting several
applications through the same IP/port.*


What steps are necessary to support several applications through the same
IP/port?

I'm picturing having two separate Mojolicious applications running in two
separate system processes, each with their own Perl binary even.  What is
necessary to reverse proxy a connection to these two separate apps
listening on the same IP/port?  How does the reverse proxy (nginx) know
which process should get the request proxied to it?

Or am I misunderstanding what is stated in bold above?

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFSkT_YXpnUbakT%3DO%2Bi1y99vVxpg8rVo%3D8V33LUtLhNfPQ%40mail.gmail.com.


Re: [Mojolicious] Reverse Proxy Standards

2019-05-19 Thread Dan Book
It can't use the first entry, because each reverse proxy will append to the
header, and so the first one could be anything supplied by the user. This
is also why reverse proxy detection must be opted into to begin with. You
can use https://metacpan.org/pod/Mojolicious::Plugin::ForwardedFor to
specify how many reverse proxy levels you are deploying behind to retrieve
the correct address.

-Dan

On Sun, May 19, 2019 at 3:23 PM Veesh Goldman  wrote:

> I'm currently working on a project using Google's App Engine. I noticed an
> issue with the reverse proxy feature, that mojolicious pulls the last entry
> from the header (the X-Forwarded-For header is a list of the proxies that
> the request traversed). The way google sets it up is that the first entry
> is the actual request ip, not the last entry.
>
> Is this a nonstandard move on Google's half, or on Mojo's?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at https://groups.google.com/group/mojolicious.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojolicious/CAO-W_8C9BFq3qhEcrwyDOttnqQvFuHTuii52UO7h5BmmLcSPVQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CABMkAVW4gcRF5%3D0RboQhn3JcunG7qNqPuzR3oq4jmDFE%3DN4Z8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Reverse Proxy Standards

2019-05-19 Thread Veesh Goldman
I'm currently working on a project using Google's App Engine. I noticed an
issue with the reverse proxy feature, that mojolicious pulls the last entry
from the header (the X-Forwarded-For header is a list of the proxies that
the request traversed). The way google sets it up is that the first entry
is the actual request ip, not the last entry.

Is this a nonstandard move on Google's half, or on Mojo's?

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CAO-W_8C9BFq3qhEcrwyDOttnqQvFuHTuii52UO7h5BmmLcSPVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.