Open qnxor opened 8 years ago
Any word on this? What's the easiest fix?
I note that using --basepath /ec/
does not fix it. The above errors are still there.
I tried the following setting on the proxy server:
RedirectPermanent /ec /ec/
ProxyPass /ec/ http://127.0.0.1:9000/
ProxyPassReverse /ec/ http://127.0.0.1:9000/
Then accessing /ec/ works, and I also could create new spreadsheets. But the redirection from creating the spreadsheet went to the / location of the proxy server. eg. http://proxyserver/wavg3ghqyhr5 When I change the link manually in the browser to http://proxyserver/ec/wavg3ghqyhr5 everything seems to be fine.
So I replaced the BASEPATH with "/ec" in main.js whereever there was a call to the newRoom() function to create a new spreadsheet (all in all on 4 locations). eg.
this.get((ref$ = {}, ref$[BASEPATH + "/=_new"] = function(){ var room; room = newRoom(); return this.response.redirect(KEY ? "/ec" + "/=" + room + "/edit" // "/ec" instead of BASEPATH : "/ec" + "/=" + room); }, ref$));
This was easier than replacing all the other BASEPATH references And it seems to work.
I used the apache conf example and created a proxypass to
/ec/
rather than/
(I have an SSL certificate tied to the hostname and I'd like ethercalc to use it too).Most ethercalc functionality appears to work fine (I tried some quick editing with 2 simultaneous users and we can see each other's modifications) but looking in Chrome's debug I'm noticing that a websocket request fails and there is an XHR request to
/zappa
which fails (should normally be/ec/zappa
):WebSocket connection to 'wss://HOSTNAME/ec/socket.io/?EIO=2&transport=websocket&sid=1kfmQHfG6wWunJFXAAAR' failed: Error during WebSocket handshake: Invalid status line
and
vex.combined.min.js:2GET https://HOSTNAME/zappa/socket/__local/1kfmQHfG6wWunJFXAAAR 404 (Not Found)
The above errors do not show when I access
:9000
directly or if I use a proxypass to/
instead of/ec/
.I'm using Ubuntu 14.04.3 with redis and ethercalc was installed using
npm install ethercalc
and started usingethercalc --port 9000
. Apache conf below.Is there anything I'm doing wrong? Can the above be fixed for proxypass
/ec/
? Are those errors safe to ignore?// minor bug: under my ubuntu I had to edit
ethercalc
and change#!/usr/bin/env node
to#!/usr/bin/env nodejs
or installnodejs-legacy
sincenode
is not an executable on the system.The apache conf is: