rabbitmq / rabbitmq-management

RabbitMQ Management UI and HTTP API
https://www.rabbitmq.com/management.html
Other
370 stars 165 forks source link

Documentation: Example of Apache Reverse Proxy config does not work with 2.4+ #868

Closed slarti-b closed 3 years ago

slarti-b commented 3 years ago

Not sure if this is the correct place, as it's a "bug" in the documentation, not the code. The documentation for putting a reverse proxy in front of the management UI says to use the following config for Apache:

ProxyPass        /api http://localhost:15672/api nocanon
ProxyPass        /    http://localhost:15672/
ProxyPassReverse /    http://localhost:15672/

I did this. It partially works. You can log in and view lists but not individual items. E.g. I can click the "Queues" tab and see the list of the queues, but if I click on a specific queue in the list I get "not found". Navigating directly via the 15672 port works fine. I suspect the documentation was correct for Apache 2.2 (I haven't confirmed this) but is not for 2.4. Following this advice I found that the correct config should be

AllowEncodedSlashes NoDecode
ProxyPass         "/api" http://localhost:15672/api nocanon
ProxyPass         "/" http://localhost:15672/
ProxyPassReverse  "/" http://localhost:15672/

The AllowEncodedSlashes NoDecode is required for apache 2.4. With this, it works perfectly.

As said, I'm logging this here as I see it as a bug in the documentation, but if there is somewhere else I should post it please let me know.

michaelklishin commented 3 years ago

Thank you for contributing an example that works for you. Doc issues belong to https://github.com/rabbitmq/rabbitmq-website/ where this was addressed.