Nginx and Hawtio

Well some days ago I was really struggling to get Nginx and Hawtio working together. I encountered nginx for the first time and had to add a proxy configuration to allow nginx to route the traffic to Hawtio. The initial configuration seemed obvious and should work. However once you came to the login page and entered your credentials it would simply reload and you get a 403 error.

Eventually after lots of fiddler snooping I saw this:

Screen Shot 12-11-15 at 04.41 PM

There is a cookie called JSESSIONID which wasn’t being passed along. So eventually I had to add this to nginx as well. Here is the final configuration:

location /integration/ {
proxy_pass http://integration.pool/hawtio/;
proxy_redirect http://$host/hawtio/  http://$host/integration/;
proxy_cookie_path /hawtio /integration;

Hope this helps someone else as well!



Fyll i dina uppgifter nedan eller klicka på en ikon för att logga in: Logo

Du kommenterar med ditt Logga ut /  Ändra )


Du kommenterar med ditt Google+-konto. Logga ut /  Ändra )


Du kommenterar med ditt Twitter-konto. Logga ut /  Ändra )


Du kommenterar med ditt Facebook-konto. Logga ut /  Ändra )


Ansluter till %s