Closed onny closed 7 years ago
Yeah, you can use https://github.com/ONLYOFFICE/document-server-integration (nodejs version of project is most feature-full)
Hi, onny.
I further wrote a build script for the ArchLinux user repository https://aur.archlinux.org/packages/onlyoffice-documentserver/
Great job!
@agolybev: Cool that you like it :)
@ShockwaveNN: Nice, that was exactly I was looking for! I started the nodejs test app and created a new document. But the page remains empty. It tries to access http://playground.pi:3000/web-apps/apps/api/documents/api.js
(the nodejs app runs on port 3000 per default). The docservice port is on 8000, so http://playground.pi:8000/web-apps/apps/api/documents/api.js
loads fine. How to fix this?
I'm using the default nginx configuration file:
map $http_host $this_host {
"" $host;
default $http_host;
}
map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
"" $scheme;
}
map $http_x_forwarded_host $the_host {
default $http_x_forwarded_host;
"" $this_host;
}
map $http_upgrade $proxy_connection {
default upgrade;
"" close;
}
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host;
proxy_set_header X-Forwarded-Proto $the_scheme;
server {
listen 0.0.0.0:80;
listen [::]:80 default_server;
server_tokens off;
rewrite ^\/OfficeWeb(\/apps\/.*)$ /web-apps$1 redirect;
location / {
proxy_pass http://localhost:8000;
proxy_http_version 1.1;
}
location /spellchecker/ {
proxy_pass http://localhost:8080/;
proxy_http_version 1.1;
}
}
Never mind, I fixed it by adding the nodejs example app to the nginx config:
map $http_host $this_host {
"" $host;
default $http_host;
}
map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
"" $scheme;
}
map $http_x_forwarded_host $the_host {
default $http_x_forwarded_host;
"" $this_host;
}
map $http_upgrade $proxy_connection {
default upgrade;
"" close;
}
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host;
proxy_set_header X-Forwarded-Proto $the_scheme;
server {
listen 0.0.0.0:80;
listen [::]:80 default_server;
server_tokens off;
rewrite ^\/OfficeWeb(\/apps\/.*)$ /web-apps$1 redirect;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
}
location ~ ^/(web-apps|sdkjs|doc|cache|fonts)/ {
proxy_pass http://localhost:8000;
proxy_http_version 1.1;
}
location ~ ^/plugins.json {
proxy_pass http://localhost:8000;
proxy_http_version 1.1;
}
location /spellchecker/ {
proxy_pass http://localhost:8080/;
proxy_http_version 1.1;
}
}
Thanks for your help!
Hey, I've got onlyoffice-documentserver running on my ArchLinux server by compiling it from source. I further wrote a build script for the ArchLinux user repository https://aur.archlinux.org/packages/onlyoffice-documentserver/ I guess that I also have to install the community server to start editing documents. But before that, I would like to test my document server setup, if everything works fine. If I visit http://127.0.0.1/ I only get a "Cannot get /" error. Is there any way to test document editing without installing community server?
Best regards, Jonas