You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by va...@gmail.com on 2021/05/17 17:01:44 UTC

[users@httpd] Connect to a node instead of a cluster

Hi All,

I have a load balancer setup like below

<Proxy balancer://confluencedc>
BalancerMember http://msts1acnf001:8098 route=1
BalancerMember http://msts1bcnf002:8098 route=2
BalancerMember http://msts1ccnf003:8098 route=3
ProxySet stickysession=ROUTEID
</Proxy>

And each node running tomcat and has a context path setup

<Context path="/confluence" docBase="../confluence" debug="0"
reloadable="false" useHttpOnly="true">

How do I configure it to access a node instead of the cluster? I do need
the cluster for users, but for admin sometimes need to access a node to
check its UI status.

Thanks,
Asif



-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Re: [users@httpd] Connect to a node instead of a cluster

Posted by va...@gmail.com.
On Mon, May 17, 2021 at 4:29 PM <va...@gmail.com> wrote:

>
>
> On Mon, May 17, 2021 at 2:59 PM Eric Covener <co...@gmail.com> wrote:
>
>>
>>
>> On Mon, May 17, 2021 at 2:51 PM <va...@gmail.com> wrote:
>>
>>> I added this but it went to a different node instead of node 1 which is
>>> msts1acnf001
>>>
>>> ProxyPass /confluencenode1 http://msts1acnf001:8098/confluence
>>> ProxyPassReverse /confluencenode1 http://msts1acnf001:8098/confluence
>>>
>>> Any suggestion what am I doing wrong?
>>>
>>
>> There is a chance your app redirected you along the way and dropped the
>> custom prefix, I would look at recent access log entries when it fails. Or,
>> test with a command-line client or developer tools running in the browser.
>>
>>
> I see this in the vhost. access log
>
> '192.168.0.36' '-' '-' 'proxy.example.com' '[17/May/2021:18:47:56 +0000]'
> 'GET /confluencenode1 HTTP/1.1' '302' '-' '-' '-' 'Mozilla/5.0 (Windows NT
> 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0' '-' '-'i '-'
>
> '192.168.0.36' '' '-' 'proxy.example.com' '[17/May/2021:18:47:56 +0000]'
> 'GET /confluence/ HTTP/1.1' '302' '465' '-' '-' 'Mozilla/5.0 (Windows NT
> 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0' '-' '-'i ''
>
> I do not see msts1acnf001 anywhere in the log
>


 Here is the snippet after adding the `/confluencenode1`

<Proxy balancer://confluencedc>
BalancerMember http://msts1acnf001:8098 route=1
BalancerMember http://msts1bcnf002:8098 route=2
BalancerMember http://msts1ccnf003:8098 route=3
ProxySet stickysession=ROUTEID
</Proxy>
...
ProxyPass /confluencenode1 http://msts1acnf001:8098/confluence
ProxyPassReverse /confluencenode1 http://msts1acnf001:8098/confluence
...
ProxyPass /confluence balancer://confluencedc/confluence
ProxyPassReverse /confluence balancer://confluencedc/confluence

Not sure if the second proxypass interferring with the first one

Thanks,
Asif



>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
>

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Re: [users@httpd] Connect to a node instead of a cluster

Posted by va...@gmail.com.
On Mon, May 17, 2021 at 2:59 PM Eric Covener <co...@gmail.com> wrote:

>
>
> On Mon, May 17, 2021 at 2:51 PM <va...@gmail.com> wrote:
>
>> I added this but it went to a different node instead of node 1 which is
>> msts1acnf001
>>
>> ProxyPass /confluencenode1 http://msts1acnf001:8098/confluence
>> ProxyPassReverse /confluencenode1 http://msts1acnf001:8098/confluence
>>
>> Any suggestion what am I doing wrong?
>>
>
> There is a chance your app redirected you along the way and dropped the
> custom prefix, I would look at recent access log entries when it fails. Or,
> test with a command-line client or developer tools running in the browser.
>
>
I see this in the vhost. access log

'192.168.0.36' '-' '-' 'proxy.example.com' '[17/May/2021:18:47:56 +0000]'
'GET /confluencenode1 HTTP/1.1' '302' '-' '-' '-' 'Mozilla/5.0 (Windows NT
10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0' '-' '-'i '-'

'192.168.0.36' '' '-' 'proxy.example.com' '[17/May/2021:18:47:56 +0000]'
'GET /confluence/ HTTP/1.1' '302' '465' '-' '-' 'Mozilla/5.0 (Windows NT
10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0' '-' '-'i ''

I do not see msts1acnf001 anywhere in the log




-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Re: [users@httpd] Connect to a node instead of a cluster

Posted by Eric Covener <co...@gmail.com>.
On Mon, May 17, 2021 at 2:51 PM <va...@gmail.com> wrote:

> I added this but it went to a different node instead of node 1 which is
> msts1acnf001
>
> ProxyPass /confluencenode1 http://msts1acnf001:8098/confluence
> ProxyPassReverse /confluencenode1 http://msts1acnf001:8098/confluence
>
> Any suggestion what am I doing wrong?
>

There is a chance your app redirected you along the way and dropped the
custom prefix, I would look at recent access log entries when it fails. Or,
test with a command-line client or developer tools running in the browser.

Re: [users@httpd] Connect to a node instead of a cluster

Posted by va...@gmail.com.
I added this but it went to a different node instead of node 1 which is
msts1acnf001

ProxyPass /confluencenode1 http://msts1acnf001:8098/confluence
ProxyPassReverse /confluencenode1 http://msts1acnf001:8098/confluence

Any suggestion what am I doing wrong?

Thanks,
Asif




On Mon, May 17, 2021 at 2:18 PM Daniel Ferradal <df...@apache.org>
wrote:

> Yes, you need to use a different "source" path for the new directives,
> destination path can be different but otherwise, how can apache tell when
> to serve which?
>
> El lun., 17 may. 2021 20:08, <va...@gmail.com> escribió:
>
>> I do have this setup
>>
>> ProxyPass /confluence balancer://confluencedc/confluence
>> ProxyPassReverse /confluence balancer://confluencedc/confluence
>>
>> To access confluence node it needs to hit /confluence and that is already
>> taken by the above config and maps to the context path.
>>
>> I am not sure if I have a second context path /adminpath and if I can I
>> suppose I will need to map it to same real dir?
>>
>> Thanks,
>> Asif
>>
>>
>> On Mon, May 17, 2021 at 1:39 PM Daniel Ferradal <df...@apache.org>
>> wrote:
>>
>>> Define a ProxyPass directive with a unique path pointing to one of the
>>> node you want to use
>>>
>>> Hint
>>> ProyPass /adminpath/ http://server1/admin/
>>>
>>>
>>> El lun., 17 may. 2021 19:03, <va...@gmail.com> escribió:
>>>
>>>> Hi All,
>>>>
>>>> I have a load balancer setup like below
>>>>
>>>> <Proxy balancer://confluencedc>
>>>> BalancerMember http://msts1acnf001:8098 route=1
>>>> BalancerMember http://msts1bcnf002:8098 route=2
>>>> BalancerMember http://msts1ccnf003:8098 route=3
>>>> ProxySet stickysession=ROUTEID
>>>> </Proxy>
>>>>
>>>> And each node running tomcat and has a context path setup
>>>>
>>>> <Context path="/confluence" docBase="../confluence" debug="0"
>>>> reloadable="false" useHttpOnly="true">
>>>>
>>>> How do I configure it to access a node instead of the cluster? I do
>>>> need the cluster for users, but for admin sometimes need to access a node
>>>> to check its UI status.
>>>>
>>>> Thanks,
>>>> Asif
>>>>
>>>>
>>>>
>>>> --
>>>> Asif Iqbal
>>>> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
>>>> A: Because it messes up the order in which people normally read text.
>>>> Q: Why is top-posting such a bad thing?
>>>>
>>>>
>>
>> --
>> Asif Iqbal
>> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is top-posting such a bad thing?
>>
>>

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Re: [users@httpd] Connect to a node instead of a cluster

Posted by Daniel Ferradal <df...@apache.org>.
Yes, you need to use a different "source" path for the new directives,
destination path can be different but otherwise, how can apache tell when
to serve which?

El lun., 17 may. 2021 20:08, <va...@gmail.com> escribió:

> I do have this setup
>
> ProxyPass /confluence balancer://confluencedc/confluence
> ProxyPassReverse /confluence balancer://confluencedc/confluence
>
> To access confluence node it needs to hit /confluence and that is already
> taken by the above config and maps to the context path.
>
> I am not sure if I have a second context path /adminpath and if I can I
> suppose I will need to map it to same real dir?
>
> Thanks,
> Asif
>
>
> On Mon, May 17, 2021 at 1:39 PM Daniel Ferradal <df...@apache.org>
> wrote:
>
>> Define a ProxyPass directive with a unique path pointing to one of the
>> node you want to use
>>
>> Hint
>> ProyPass /adminpath/ http://server1/admin/
>>
>>
>> El lun., 17 may. 2021 19:03, <va...@gmail.com> escribió:
>>
>>> Hi All,
>>>
>>> I have a load balancer setup like below
>>>
>>> <Proxy balancer://confluencedc>
>>> BalancerMember http://msts1acnf001:8098 route=1
>>> BalancerMember http://msts1bcnf002:8098 route=2
>>> BalancerMember http://msts1ccnf003:8098 route=3
>>> ProxySet stickysession=ROUTEID
>>> </Proxy>
>>>
>>> And each node running tomcat and has a context path setup
>>>
>>> <Context path="/confluence" docBase="../confluence" debug="0"
>>> reloadable="false" useHttpOnly="true">
>>>
>>> How do I configure it to access a node instead of the cluster? I do need
>>> the cluster for users, but for admin sometimes need to access a node to
>>> check its UI status.
>>>
>>> Thanks,
>>> Asif
>>>
>>>
>>>
>>> --
>>> Asif Iqbal
>>> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
>>> A: Because it messes up the order in which people normally read text.
>>> Q: Why is top-posting such a bad thing?
>>>
>>>
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
>

Re: [users@httpd] Connect to a node instead of a cluster

Posted by va...@gmail.com.
I do have this setup

ProxyPass /confluence balancer://confluencedc/confluence
ProxyPassReverse /confluence balancer://confluencedc/confluence

To access confluence node it needs to hit /confluence and that is already
taken by the above config and maps to the context path.

I am not sure if I have a second context path /adminpath and if I can I
suppose I will need to map it to same real dir?

Thanks,
Asif


On Mon, May 17, 2021 at 1:39 PM Daniel Ferradal <df...@apache.org>
wrote:

> Define a ProxyPass directive with a unique path pointing to one of the
> node you want to use
>
> Hint
> ProyPass /adminpath/ http://server1/admin/
>
>
> El lun., 17 may. 2021 19:03, <va...@gmail.com> escribió:
>
>> Hi All,
>>
>> I have a load balancer setup like below
>>
>> <Proxy balancer://confluencedc>
>> BalancerMember http://msts1acnf001:8098 route=1
>> BalancerMember http://msts1bcnf002:8098 route=2
>> BalancerMember http://msts1ccnf003:8098 route=3
>> ProxySet stickysession=ROUTEID
>> </Proxy>
>>
>> And each node running tomcat and has a context path setup
>>
>> <Context path="/confluence" docBase="../confluence" debug="0"
>> reloadable="false" useHttpOnly="true">
>>
>> How do I configure it to access a node instead of the cluster? I do need
>> the cluster for users, but for admin sometimes need to access a node to
>> check its UI status.
>>
>> Thanks,
>> Asif
>>
>>
>>
>> --
>> Asif Iqbal
>> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is top-posting such a bad thing?
>>
>>

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Re: [users@httpd] Connect to a node instead of a cluster

Posted by Daniel Ferradal <df...@apache.org>.
Define a ProxyPass directive with a unique path pointing to one of the node
you want to use

Hint
ProyPass /adminpath/ http://server1/admin/


El lun., 17 may. 2021 19:03, <va...@gmail.com> escribió:

> Hi All,
>
> I have a load balancer setup like below
>
> <Proxy balancer://confluencedc>
> BalancerMember http://msts1acnf001:8098 route=1
> BalancerMember http://msts1bcnf002:8098 route=2
> BalancerMember http://msts1ccnf003:8098 route=3
> ProxySet stickysession=ROUTEID
> </Proxy>
>
> And each node running tomcat and has a context path setup
>
> <Context path="/confluence" docBase="../confluence" debug="0"
> reloadable="false" useHttpOnly="true">
>
> How do I configure it to access a node instead of the cluster? I do need
> the cluster for users, but for admin sometimes need to access a node to
> check its UI status.
>
> Thanks,
> Asif
>
>
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
>