How should I set the url prefix for the onlyoffice server ?

Do you want to: Ask a how-to question
Document Server version: 6.4.0
Type of installation of the Document Server (docker, deb/rpm, exe)
OS: docker
Browser version: chrome 111.0.5563.64

Hello, I am a student and I am learning how to embed OnlyOffice application into my web program. I am facing a problem now. When I open an OnlyOffice editing page on my web page, the OnlyOffice service will redirect the page to the following URL: http://192.168.1.49:8081/6.4.0-121/web-apps/apps/presentationeditor/main/index_loader.html?_dc=6.4.0-1. My system has a unified URL prefix “app” for internal usage. Therefore, I want to add the “app” prefix to the editing page address that OnlyOffice program redirects to, for example, http://192.168.1.49:8081/app/6.4.0-121/web-apps/apps/presentationeditor/main/index_loader.html?_dc=6.4.0-1. How can I achieve this effect at the program level? It’s important for me because this is a part of my graduation project. Thank you for your help.

hey @Hason

Virtual paths for the Document Server can be set only using proxy.
Nginx installed with the Document Server on the same server to be configured as proxy.

  1. Install Document Server on a custom port using the official installation guide.

  2. Run Nginx as proxy on ports 80/443 using this article https://github.com/ONLYOFFICE/document-server-proxy/tree/master/nginx#readme

  3. Use the following configuration file for Nginx https://github.com/ONLYOFFICE/document-server-proxy/blob/master/nginx/proxy-to-virtual-path.conf

Link to general information: Using ONLYOFFICE Docs behind the proxy - ONLYOFFICE