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: Proxy Shared Worker Issue
Author
idblew



Joined: 14 Nov 2014
Posts: 10
Location: Melbourne, Australia

PostPosted: Mon 23 Nov '15 4:28    Post subject: Proxy Shared Worker Issue Reply with quote

Hi,

I have a scenario whereby multiple customers are hosted from a common URL (not ideal but I have no control over this). Initial connection is handled by a hardware load-balancer (this deals with SSL and other security) which then forwards the requests to Apache.

Currently the configuration is as follows:

Code:
<VirtualHost *:4744>
  ServerName product.service.com

  ProxyPass /customerA/WebHelpV1 http://127.0.0.1:8081/WebHelp
  ProxyPassReverse /customerA/WebHelpV1 http://127.0.0.1:8081/WebHelpV1

  ProxyPass /customerB/WebHelp http://127.0.0.1:8081/WebHelpV1
  ProxyPassReverse /customerB/WebHelp http://127.0.0.1:8081/WebHelpV1

  ProxyPass /customerC/WebHelp http://127.0.0.1:8081/WebHelpV1
  ProxyPassReverse /customerC/WebHelp http://127.0.0.1:8081/WebHelpV1
</VirtualHost>


This should allow us to have different customers using different versions of the "WebHelp" product.

On starting Apache, this generates the message:

Code:
[Mon Nov 23 00:22:36.103585 2015] [proxy:info] [pid 28049466:tid 1] AH01145: Sharing worker 'http://127.0.0.1:8081/WebHelp' instead of creating new worker 'http://localhost:8081/127.0.0.1:8081/WebHelp'


The problem is that if CustomerB or CustomerC try accessing their respective /WebHelp (i.e. /customerB/WebHelp/) they're getting redirected to /CustomerA/WebHelp/, which I believe is due to the worker sharing.

Is there any way to avoid/workaround the sharing of the worker (fudge the Location header?)
Back to top
idblew



Joined: 14 Nov 2014
Posts: 10
Location: Melbourne, Australia

PostPosted: Mon 23 Nov '15 4:52    Post subject: Reply with quote

Forgot to say, this is Apache 2.4.12 on AIX 6.1 (not that I think the O/S is the cause of this).

Have also replicated this on 2.4.17
Back to top
idblew



Joined: 14 Nov 2014
Posts: 10
Location: Melbourne, Australia

PostPosted: Mon 23 Nov '15 7:12    Post subject: Reply with quote

Just managed to answer my own question. Cool

Had to substitute the ProxyPass/ProxyPassReverse for Location sections, so this:

Code:
<VirtualHost *:4744>
  ServerName product.service.com

  ProxyPass /customerA/WebHelp http://127.0.0.1:8081/WebHelpV1
  ProxyPassReverse /customerA/WebHelp http://127.0.0.1:8081/WebHelpV1

  ProxyPass /customerB/WebHelp http://127.0.0.1:8081/WebHelpV1
  ProxyPassReverse /customerB/WebHelp http://127.0.0.1:8081/WebHelpV1

  ProxyPass /customerC/WebHelp http://127.0.0.1:8081/WebHelpV1
  ProxyPassReverse /customerC/WebHelp http://127.0.0.1:8081/WebHelpV1
</VirtualHost>


becomes this:

Code:
<VirtualHost *:4744>
  ServerName product.service.com

  [Location "/customerA/WebHelp"]
    ProxyPass http://127.0.0.1:8081/WebHelpV1
    ProxyPassReverse http://127.0.0.1:8081/WebHelpV1
  [/Location]

  [Location "/customerB/WebHelp"]
    ProxyPass http://127.0.0.1:8081/WebHelpV1
    ProxyPassReverse http://127.0.0.1:8081/WebHelpV1
  [/Location]

  [Location "/customerC/WebHelp"]
    ProxyPass http://127.0.0.1:8081/WebHelpV1
    ProxyPassReverse http://127.0.0.1:8081/WebHelpV1
  [/Location]
</VirtualHost>
Back to top


Reply to topic   Topic: Proxy Shared Worker Issue View previous topic :: View next topic
Post new topic   Forum Index -> Apache