Skip to content

Commit

Permalink
fix nginx location for rabbitmq dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Nguyen-Duc-Khai committed Dec 9, 2023
1 parent 5842feb commit ce776f2
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,25 @@ server {
proxy_pass http://portainer/api/websocket/;
}

location /rmq {
proxy_pass http://rabbitmq;
location /rabbitmq/api/ {
rewrite ^ $request_uri;
rewrite ^/rabbitmq/api/(.*) /api/$1 break;
return 400;
proxy_pass http://rabbitmq$uri;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location /rabbitmq/ {
proxy_pass http://rabbitmq/;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_intercept_errors on;
proxy_buffering off;
proxy_redirect off;
}
}

Expand Down

0 comments on commit ce776f2

Please sign in to comment.