logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Secure balancer-manager for Reverse Proxy not working
Author
TPL



Joined: 25 Mar 2014
Posts: 24
Location: Germany, Hamburg

PostPosted: Fri 15 Nov '19 23:20    Post subject: Secure balancer-manager for Reverse Proxy not working Reply with quote

Hi,

i have some trouble with the configuration of a secure balancer-manager.
I simplified the config for better explain.

Environment:
Windows Server 2019
Apache/2.4.41 (Win64) - VC15

My Proxy sends all request to the backends. --> OK
Enable balancer-manager for https://myproxy.de/balancer-manager --> OK

But if i secure the balance-manager with "require local" or "require ip XXX" it doesn't work. In this case "balancer-manager" will be ignored.

Btw:
With "ProxyPass /anything balancer://test/" it's also works, but this is not possible in my case.

Any Idea?

Thanks
Timo


Code:

<VirtualHost *:443>
ServerName myproxy.de

DocumentRoot "${APACHE_BASE}/htdocs/myproxy.de"

 <Directory "${APACHE_BASE}/htdocs/myproxy.de">
    Require all granted
 </Directory>

   SSLEngine on
   SSLCertificateFile "${APACHE_BASE}/conf/ssl/myproxy.de.pem"
   SSLCertificateKeyFile "${APACHE_BASE}/conf/ssl/myproxy.de.key"

   SSLProxyEngine On
   SSLProxyCheckPeerCN off
   SSLProxyCheckPeerExpire off
   SSLProxyCheckPeerName off

   ProxyRequests Off
   ProxyPreserveHost On

    # Load Balancer Manager
  <Location /balancer-manager>
   SetHandler balancer-manager
   # Disable "Require local" an everything works fine.
   Require local
  </Location>
 
   <Proxy balancer://test>
     BalancerMember http://backend1/artifactory/
     BalancerMember http://backend2/artifactory/
     ProxySet lbmethod=byrequests
   </Proxy>

   ProxyPass "/balancer-manager" "!"
   ProxyPass / balancer://test/
        ProxyPassReverse / balancer://test/
 

</VirtualHost>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 08 Jun '20 12:59    Post subject: Re: Secure balancer-manager for Reverse Proxy not working Reply with quote

TPL wrote:

But if i secure the balance-manager with "require local" or "require ip XXX" it doesn't work. In this case "balancer-manager" will be ignored.


Hi Timo,

what do you mean it will be ignored?
Back to top
TPL



Joined: 25 Mar 2014
Posts: 24
Location: Germany, Hamburg

PostPosted: Fri 12 Jun '20 8:06    Post subject: Reply with quote

The Proxy sends /balancer-manager to the Backend Server and not to the handler for "balancer-manager".

A additional slash ist the only solution we found. Now it's possible to secure the balancer-manager interface.

# Load Balancer Manager
<Location "/balancer-manager/">
SetHandler balancer-manager
# Disable "Require local" an everything works fine.
Require local
</Location>

<Proxy balancer://test>
BalancerMember http://backend1/artifactory/
BalancerMember http://backend2/artifactory/
ProxySet lbmethod=byrequests
</Proxy>

ProxyPass "/balancer-manager/" "!"
ProxyPass / balancer://test/
ProxyPassReverse / balancer://test/
Back to top


Reply to topic   Topic: Secure balancer-manager for Reverse Proxy not working View previous topic :: View next topic
Post new topic   Forum Index -> Apache