-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work when using Reverse Proxy #148
Comments
I'm not that familiar with nginx but we do use web sockets to send data to the dash and the fact that you get the page loading but have empty graphs suggests that the web socket connection has failed. This page suggests that you need a capital U in upgrade for websockets:
|
@sjanuary That's probably it, The dashboard is connecting to my application socket.io. location ~ * \ .io { it is connected to port 5451. How can I make both work together? |
@leonetosoft first, did you try changing |
As I said, I already have this configuration, the dashboard is connecting to my other socket server, not what it should be. Was there something to do? |
Ok, your last post was still using a lower case 'u' in Upgrade so I assumed you hadn't changed it. appmetrics-dash/public/index.html Line 173 in 0518e71
appmetrics-dash/lib/appmetrics-dash.js Line 148 in 45677a2
|
Probably it should be connecting to my socket server because of this rule: location ~* .io { She assumes ~ \ .io Would it be possible to change the socket port? In case my uses 5451, I use proxy for any connection, from motorcycle I only keep the incoming port 80 open. |
' |
If you use |
I understand, using the monitor (options) is it possible to change the port that Socket.IO works? Am I right ? options.server = my express server, http Thanks for listening. |
No, you can configure the port but not alongside setting the server option (edited) See https://github.com/RuntimeTools/appmetrics-dash#monitoroptions |
Hello, I must first thank the developers for the spectacular monitoring tool.
Now I need to tell you a problem I'm having to access my metrics from an api that uses proxy.
It works as follows, my api is connected on port 5454 so I put the monitor defining the url:
dash.attach ({
url: '/ api / monitor'
});
Locally worked, however external it does not bring me any monitoring data, it is empty.
My proxy works when the user types my domain name + api.
I use nginx proxy:
location / api {
proxy_set_header X-Real-IP $ remote_addr;
proxy_set_header X-Forwarded-For $ proxy_add_x_forwarded_for;
proxy_set_header Host $ http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http: // localhost: 5450;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $ http_upgrade;
proxy_set_header Connection "upgrade";
}
The text was updated successfully, but these errors were encountered: