“Rabbitmq”的版本间的差异

来自YS的笔记
跳到导航 跳到搜索
(创建页面,内容为“ 反向代理配置: 文档:https://www.rabbitmq.com/management.html#proxy Apache: AllowEncodedSlashes On ProxyPass /api http://localhost:15672/api noc…”)
 
 
(未显示同一用户的2个中间版本)
第1行: 第1行:
 
+
<seo title ="Rabbitmq" titlemode ="append" keywords="Rabbitmq " description ="Not found The object you clicked on was not found; it may have been deleted on the server."></seo>
  
  
 
反向代理配置:
 
反向代理配置:
 
文档:https://www.rabbitmq.com/management.html#proxy
 
文档:https://www.rabbitmq.com/management.html#proxy
 +
 +
配置好反向代理发现会报错
 +
<pre>
 +
Not found
 +
The object you clicked on was not found; it may have been deleted on the server.
 +
</pre>
 +
需要修改服务器配置,如下:
  
 
Apache:
 
Apache:
AllowEncodedSlashes On
+
 
ProxyPass        /api http://localhost:15672/api nocanon
+
    AllowEncodedSlashes On
ProxyPass        /    http://localhost:15672/
+
    ProxyPass        /api http://localhost:15672/api nocanon
ProxyPassReverse /    http://localhost:15672/
+
    ProxyPass        /    http://localhost:15672/
 +
    ProxyPassReverse /    http://localhost:15672/
 +
 
  
 
nginx:
 
nginx:
 +
 
nginx没有nocanon,手动配置每个重定向:
 
nginx没有nocanon,手动配置每个重定向:
  

2019年8月5日 (一) 10:35的最新版本


反向代理配置: 文档:https://www.rabbitmq.com/management.html#proxy

配置好反向代理发现会报错

Not found
The object you clicked on was not found; it may have been deleted on the server.

需要修改服务器配置,如下:

Apache:

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


nginx:

nginx没有nocanon,手动配置每个重定向:


   server {
       listen       80;
       server_name  rb.test.com;
       charset utf-8;
       root   /data/sites/mch_new/public;
       location /api/queues/ {
           proxy_pass http://127.0.0.1:15672/api/queues/%2F/;
       }
       location /api/exchanges/ {
           proxy_pass http://127.0.0.1:15672/api/exchanges/%2F/;
       }
       location / {
               port_in_redirect on;
               proxy_redirect  off;
               charset utf-8;
               proxy_pass http://127.0.0.1:15672/;
               proxy_set_header Host $host;
               proxy_set_header X-Real-IP $remote_addr;
               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
               rewrite ^/(.*)$ /$1 break;
       }
   }


参考:Nginx as reverse proxy for RabbitMQ MochiWeb server