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

Fix OnlyOffice websockets #2457

Merged
merged 7 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apps/onlyoffice_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ else
# Remove config.php value set when install was successful
nextcloud_occ config:system:delete allow_local_remote_servers
nextcloud_occ config:system:delete onlyoffice
nextcloud_occ config:system:delete onlyoffice jwt_secret
nextcloud_occ config:system:delete onlyoffice jwt_header
# Show successful uninstall if applicable
removal_popup "$SCRIPT_NAME"
fi
Expand Down Expand Up @@ -205,9 +207,12 @@ then
# basic proxy settings
ProxyRequests off

ProxyPassMatch (.*)(\/websocket)$ "ws://127.0.0.3:9090/\$1\$2"
ProxyPass / "http://127.0.0.3:9090/"
ProxyPassReverse / "http://127.0.0.3:9090/"
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://127.0.0.3:9090/" [P,L]

<Location />
ProxyPassReverse /
Expand Down
11 changes: 8 additions & 3 deletions nextcloud_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,14 @@ $DOCKER_RUN_OUTPUT"
## Don't upgrade to community if EE is installed
if ! does_this_docker_exist onlyoffice-ee
then
print_text_in_color "$IRed" "Skipping OnlyOffice due to issues with Websockets: https://forum.onlyoffice.com/t/onlyoffice-7-3-websocket-path-changed/3767/5"
print_text_in_color "$IRed" "You are adviced to reinstall OnlyOffice with the menu script: sudo bash /var/scripts/menu.sh."
#docker_update_specific 'onlyoffice' 'OnlyOffice'
if does_this_docker_exist 'onlyoffice/documentserver'
then
docker_update_specific 'onlyoffice' 'OnlyOffice'
msg_box "OnlyOffice updated the way websockets work, and you need to update your configuration.\n
Please update your Apache2 config to this: https://github.com/nextcloud/vm/blob/master/apps/onlyoffice_docker.sh#L210-L215.
Another option is to reinstall OnlyOffice with the menu script; sudo bash /var/scripts/menu.sh\n
If you need help, please get support here: https://shop.hanssonit.se/product/premium-support-per-30-minutes/"
fi
fi
# Full Text Search
docker_update_specific 'fts_esror' 'Full Text Search'
Expand Down