2

I am using Activemq as broker, client side is Paho js to send websocket request(ws protocol). Everything work fine on server, but when the server start to set nginx as proxy, the client can not connect to server( but I can connect to Activemq UI web). My nginx setting is:

map $http_upgrade $connection_upgrade {
     default upgrade;
     '' close;
}
server {
     listen 16614;
     server_name mq.mysite.com;
     access_log /var/log/docker/nginx/access_activemq.log activemq_custom;

     location / {
           proxy_pass  http://192.168.10.13:16614; 
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection $connection_upgrade;

     }
}

I am using 80 port to listen ActiveMQ webUI, and 16614 to ws protocol.

Is there any missing step?

Rong Nguyen
  • 121
  • 5
  • Oh, so strange, it works after restart Nginx docker container. `nginx -s reload` does not work. – Rong Nguyen Jun 08 '16 at 08:07
  • Write this in your own answer not in a comment. Describe what the cause of problem was and how you resolved it. After 48 hours you can accept your own answer. – rda Jun 08 '16 at 10:32

1 Answers1

0

The problem come from Docker, nginx -s reload command sometimes does not work exactle, I have to restart Nginx container.

Rong Nguyen
  • 121
  • 5