[GH-ISSUE #90] log.io server access behind nodejs http-proxy #71

Closed
opened 2026-02-26 05:31:14 +03:00 by kerem · 1 comment
Owner

Originally created by @woale on GitHub (Aug 22, 2013).
Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/90

I've setup nodejs http-proxy to access apps (with their specific ports) over port 80 through a specific subdomain, e.g. ;

var httpProxy = require('http-proxy');
var port = process.env.PORT || 80;

var options = {
hostnameOnly: true,
router: {
'app1.mydomain.com': '127.0.0.1:3131',
'app2.mydomain.com': '127.0.0.1:3132',
'app3.mydomain.com': '127.0.0.1:3133',
'logs.mydomain.com': '127.0.0.1:28778'
}
};
var proxyServer = httpProxy.createServer(options);

When accessed via the url before proxy (e.g. logs.mydomain.com), most of the time (not always!), the log.io page renders without any nodes/streams, and almost never any log updates are shown. While, accessing straight to 127.0.0.1:28778, all nodes & streams are given, and log updates are shown. Anyone else experiencing this ?

Originally created by @woale on GitHub (Aug 22, 2013). Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/90 I've setup nodejs http-proxy to access apps (with their specific ports) over port 80 through a specific subdomain, e.g. ; var httpProxy = require('http-proxy'); var port = process.env.PORT || 80; var options = { hostnameOnly: true, router: { 'app1.mydomain.com': '127.0.0.1:3131', 'app2.mydomain.com': '127.0.0.1:3132', 'app3.mydomain.com': '127.0.0.1:3133', 'logs.mydomain.com': '127.0.0.1:28778' } }; var proxyServer = httpProxy.createServer(options); When accessed via the url before proxy (e.g. logs.mydomain.com), most of the time (not always!), the log.io page renders without any nodes/streams, and almost never any log updates are shown. While, accessing straight to 127.0.0.1:28778, all nodes & streams are given, and log updates are shown. Anyone else experiencing this ?
kerem closed this issue 2026-02-26 05:31:14 +03:00
Author
Owner

@msmathers commented on GitHub (Aug 1, 2014):

This is likely a websocket issue as they don't play nicely with reverse proxies, load balancers, etc... Most likely the http-proxy library is doing something to the websocket handshake or heartbeat that socket.io doesn't like. Unfortunately there's not much that can be done about this within the log.io application, we usually recommend a direct HTTP connection.

<!-- gh-comment-id:50853633 --> @msmathers commented on GitHub (Aug 1, 2014): This is likely a websocket issue as they don't play nicely with reverse proxies, load balancers, etc... Most likely the http-proxy library is doing something to the websocket handshake or heartbeat that socket.io doesn't like. Unfortunately there's not much that can be done about this within the log.io application, we usually recommend a direct HTTP connection.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/log.io-NarrativeScience-old#71
No description provided.