我可以把我的頭纏住......我們有要求使用隱藏在NGINX代理後面的ActiveMQ,但我不知道如何設置它。ActiveMQ和NGINX
對於ActiveMQ的我設置不同的端口對所有協議
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<transportConnector name="openwire" uri="tcp://0.0.0.0:62716?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="amqp" uri="amqp://0.0.0.0:5782?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:62713?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="mqtt" uri="mqtt://0.0.0.0:1993?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ws" uri="ws://0.0.0.0:62714?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
</transportConnectors>
而且這樣的nginx的配置:
server {
listen *:61616;
server_name 192.168.210.15;
index index.html index.htm index.php;
access_log /var/log/nginx/k1.access.log combined;
error_log /var/log/nginx/k1.error.log;
location/{
proxy_pass http://localhost:62716;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_redirect off;
proxy_method stream;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Proxy "";
}
}
(同所有其他五個重新定義端口)
我雖然這會暴露默認端口ActiveMQ端口和Nginx將映射到新的定義,但這是行不通的。
對於通信,我們在版本3.1.4中使用NodeJs庫amqp10。
並且所有端口都在服務器上啓用...如果使用沒有nginx代理的標準端口,它就可以工作。
任何想法我錯過了什麼?感謝您的任何想法。