Skip to content
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

cross-origin-resource-sharing on Windows #6

Open
dannyscarborough opened this issue Nov 20, 2018 · 6 comments
Open

cross-origin-resource-sharing on Windows #6

dannyscarborough opened this issue Nov 20, 2018 · 6 comments

Comments

@dannyscarborough
Copy link

Hi,

I'm currently trying to connect my OnlyOffice document server to XWiki and I can see referenced at the bottom of the installation instructions (https://store.xwiki.com/xwiki/bin/view/Extension/OnlyOfficeConnectorApplication#installation)
I either need to put a proxy in front of my installation or copy the conf. Can you confirm I should be copying this file to C:\Program Files\ONLYOFFICE\DocumentServer\nginx\conf\includes ?

Because when I copy this config I receive this error in my nginx error.log
nginx: [emerg] "proxy_cache" zone "fonts_cache" is unknown in C:\Program Files\ONLYOFFICE\DocumentServer\nginx/conf/nginx.conf:34

I'm currently using the latest build of OnlyOffice Document server on Windows 2008 R2.

Any help would be really appreciated 😸

@mflorea
Copy link
Contributor

mflorea commented Nov 22, 2018

Can you confirm I should be copying this file to C:\Program Files\ONLYOFFICE\DocumentServer\nginx\conf\includes ?

@dannyscarborough I confirm that's the right location.

"proxy_cache" zone "fonts_cache" is unknown

I found this on a quick search https://serverfault.com/questions/452777/proxy-cache-zone-static-is-unknown . Looks like you also need to configure the proxy_cache_path. I've no idea why this is required on Windows and not on Linux.

However, our sysadmin recommends using the first option indicated in the installation instructions: put a reverse proxy in front of OnlyOffice, rather than changing the OnlyOffice configuration (which might make future upgrades difficult).

@dannyscarborough
Copy link
Author

put a reverse proxy in front of OnlyOffice

Can you suggest any guides that I could follow to setup a reverse proxy on Windows? I have zero experience with this sort of thing.

@mflorea
Copy link
Contributor

mflorea commented Nov 22, 2018

@dannyscarborough you can install nginx on Windows and modify conf/nginx.conf by adding this configuration snippet which you need to adapt to your setup.

@dannyscarborough
Copy link
Author

@mflorea Thank you, I'm guessing this needs installing on a different server not the one with Only Office on?

@mflorea
Copy link
Contributor

mflorea commented Nov 23, 2018

No, it doesn't have to be on a different machine. The reverse proxy should be on the same machine as the OnlyOffice server.

@dannyscarborough
Copy link
Author

Thanks, I've replaced the default nginx.conf with this

however, I'm seeing this error in the console when I try to load any office document in XWiki:

Uncaught DOMException: Failed to construct 'WebSocket': The URL '' is invalid. at ReconnectingWebSocket.open (http://genesis/xwiki/bin/download/XWikiOnlyOfficeCode/XooEdit/reconnecting-websocket:206:18) at new ReconnectingWebSocket (http://genesis/xwiki/bin/download/XWikiOnlyOfficeCode/XooEdit/reconnecting-websocket:290:18) at Object.connect (http://genesis/xwiki/bin/download/XWikiOnlyOfficeCode/XooEdit/netflux-client.js:252:17) at http://genesis/xwiki/bin/jsx/XWikiOnlyOfficeCode/GetKeys:1:2504 at Object.<anonymous> (http://genesis/xwiki/bin/jsx/XWikiOnlyOfficeCode/GetKeys:1:990) at i (http://genesis/xwiki/webjars/wiki%3Axwiki/jquery/2.2.2/jquery.min.js?r=1:2:27151) at Object.fireWith [as resolveWith] (http://genesis/xwiki/webjars/wiki%3Axwiki/jquery/2.2.2/jquery.min.js?r=1:2:27914) at z (http://genesis/xwiki/webjars/wiki%3Axwiki/jquery/2.2.2/jquery.min.js?r=1:4:12120) at XMLHttpRequest.<anonymous> (http://genesis/xwiki/webjars/wiki%3Axwiki/jquery/2.2.2/jquery.min.js?r=1:4:15680)

The error is on line 206 on http://genesis/xwiki/bin/download/XWikiOnlyOfficeCode/XooEdit/reconnecting-websocket

function generateEvent(s, args) { var evt = document.createEvent("CustomEvent"); evt.initCustomEvent(s, false, false, args); return evt; }; this.open = function (reconnectAttempt) { ws = new WebSocket(self.url, protocols || []);

Do I have it setup correctly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants