美文网首页
rabbitmq页面操作提示:Got response code

rabbitmq页面操作提示:Got response code

作者: Yluozi | 来源:发表于2021-12-22 16:53 被阅读0次

    页面操作:add queue 报错:Got response code 405 with body {"error":"Method Not Allowed","reason":""Method Not Allowed"\n"}

    原因:

    正常访问该地址:https://xxx.xxx.com/mq/ 时能正常跳转,
    但是 rabbitmq management 的 API url 出现了 %2f 字符,这些字符会在经过 nginx 被转换为/

    image.png

        if ($request_uri ~* "/rabbitmq/(.*)"){
                proxy_pass http://127.0.0.1:15672/$1;
                break;
        }
    
    location /rabbitmq/ {
        proxy_set_header Host             $host;
        proxy_set_header X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
        if ($request_uri ~* "/rabbitmq/(.*)"){
                proxy_pass http://127.0.0.1:15672/$1;
                break;
        }
        proxy_pass http://rabbitmq:15672/;
    }
    

    相关文章

      网友评论

          本文标题:rabbitmq页面操作提示:Got response code

          本文链接:https://www.haomeiwen.com/subject/msnqqrtx.html