Reputation: 10012
I have an Apache webserver serving pages on port 443 and socket.io responding on port 8888.
Is there any way to have just the secure port (443) handle everything (i.e. webpages and socket.io) and close everything else?
Many of my customers will only have ports 80 and 443 available to them. I don't want to send insecure data over port 80.
Upvotes: 0
Views: 141
Reputation: 1016
Looks like mod_proxy_wstunnel
might do what you need:
ProxyPass /wss2/ ws://localhost:8888/
Upvotes: 1
Reputation: 34003
You could use apache to listen on 443 and "reverse" proxy requests to socket.io on port 8888 based on an url.
Similar questions were already asked here: Apache, NodeJS and socket.io: Use Apache or NodeJS as Reverse-Proxy?, http://www.apachetutor.org/admin/reverseproxies and http://www.microhowto.info/howto/configure_apache_as_a_reverse_proxy.html
Official apache documentation is here: https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypassreverse
Upvotes: 1