ggach - 11 months ago 83
Apache Configuration Question

# How to properly map [ server.com:port ] to [ server.com/param ] for node.js app?

I'm relatively new to Node.js and have been trying to solve this problem quite some time.

So, basically I want to map my server.com/chat to server.com:9999.
Tried to accomplish this using ProxyPass and ProxyPassReverse in my apache confs but I guess node server itself is having problem serving the socket.io file with a new url.

Here are the screens

# config file

Any help would be much appreciated!

EDIT:

# New screen, problem with a handshake

ProxyPass /socket.io http://server.com:9999

I would like to recommend to use RewriteCond for websocket used by socket.io and you may like to have a look http://serverfault.com/questions/616370/configuring-apache-2-4-mod-proxy-wstunnel-for-socket-io-1-0/623027#623027