Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nguyen-Duc-Khai committed Dec 18, 2023
1 parent 1d13808 commit 11d7965
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,39 @@ server {
proxy_pass http://portainer/api/websocket/;
}

location /rabbitmq/ {
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;
# location /rabbitmq/ {
# 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;

proxy_pass http://rabbitmq/;
# proxy_pass http://rabbitmq/;
# }

# location ~* /rabbitmq/(.*) {
# rewrite ^/rabbitmq/(.*)$ /$1 break;
# proxy_pass http://rabbitmq/;
# }

location /rabbitmq/api/ {
rewrite ^ $request_uri;
rewrite ^/rabbitmq/api/(.*)/api/$1 break;
return 400;
proxy_pass http://rabbitmq$uri;
}

location ~* /rabbitmq/(.*) {
location /rabbitmq {
rewrite ^/rabbitmq$ /rabbitmq/ permanent;
rewrite ^/rabbitmq/(.*)$ /$1 break;
proxy_pass http://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;
}
}

server {
Expand Down

0 comments on commit 11d7965

Please sign in to comment.