Apache fails to restart and reports errors after using balancer relation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apache2 Charm |
New
|
Undecided
|
Unassigned |
Bug Description
After using balancer relation apache fails to restart with the following error:
Invalid command 'RequestHeader'
This is because generated balancer configuration contains:
RequestHeader set X-Balancer-Name "your_charm_name"
but headers module is not enabled. A fix for this is to just enable it with:
juju config apache2 enable_
After that apache starts fine, but when you try to test your balancer by making http request you get internal server error and the following error in logs:
AH01144: No protocol handler was valid for the URL / (scheme 'balancer')
This is because another module: proxy_http is missing, so the fix is to add it to the list:
juju config apache2 enable_
After that the balancer is working as expected.
Perhaps it would be good if these two modules were configured automatically when balancer relation was used, since they are required to function it properly. Alternatively the documentation could be updated to mention you have to enable these modules before using the relation.