Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Proxy Shared Worker Issue |
|
Author |
|
idblew
Joined: 14 Nov 2014 Posts: 10 Location: Melbourne, Australia
|
Posted: Mon 23 Nov '15 4:28 Post subject: Proxy Shared Worker Issue |
|
|
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
|
Posted: Mon 23 Nov '15 4:52 Post subject: |
|
|
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
|
Posted: Mon 23 Nov '15 7:12 Post subject: |
|
|
Just managed to answer my own question.
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 |
|
|
|
|
|
|