Reverse proxy for port 9980

Hi,
I have a few remote users that are behind a proxy that only allows port 80 and 443. They tell me that Collabora Online is not working, I assume because it makes some calls to port 9980, that is blocked for them.
In my setup I have Nextcloud and Collabora on the same server, with the latter one responding on port 9980. Is it possible to use Nextcloud virtualhost configuration to proxy requests to port 9980, e.g.:

office.mysite.com/collaboraoffice -> office.mysite.com:9980

Do I have to reverse proxy /loleaflet URLs too, as I read in some Collabora + reverse proxy guides?
Everything is in Https with real certificates.

How does your url look for your collabora setup?
The one you write on the admin interface?

It should look like these:
https://office.domain.com

That’s the reason of the proxy in the first place, it redirects the connection from 9980 to 443.
If you have it like these:
https://office.domain.com:9980

Maybe you only need to delete the β€œ:9980”

The best practice is to have 2 (sub)domains, for this example will call them:

When using a reverse proxy like Apache (which can be the initial Apache on which NC is running) you can create a VirtualHost for Collabora and redirect traffic for https://office.domain.com to http://:9980

An example is below for the VirtualHost:

<VirtualHost *:443>
  ServerName office.domain.com

  # SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
  SSLEngine on
  SSLCertificateFile    /etc/letsencrypt/live/domain.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
  SSLProtocol             all -SSLv2 -SSLv3

  # Encoded slashes need to be allowed
  AllowEncodedSlashes NoDecode

  # Container uses a unique non-signed certificate
  SSLProxyEngine On
  SSLProxyVerify None
  SSLProxyCheckPeerCN Off
  SSLProxyCheckPeerName Off

  # keep the host
  ProxyPreserveHost On

  # static html, js, images, etc. served from loolwsd
  # loleaflet is the client part of LibreOffice Online
  ProxyPass           /loleaflet https://<internal IP>:9980/loleaflet retry=0
  ProxyPassReverse    /loleaflet https://<internal IP>:9980/loleaflet

  # WOPI discovery URL
  ProxyPass           /hosting/discovery https://<internal IP>:9980/hosting/discovery retry=0
  ProxyPassReverse    /hosting/discovery https://<internal IP>:9980/hosting/discovery

  # Main websocket
  ProxyPassMatch "/lool/(.*)/ws$" wss://<internal IP>:9980/lool/$1/ws nocanon

  # Admin Console websocket
  ProxyPass   /lool/adminws wss://<internal IP>:9980/lool/adminws

  # Download as, Fullscreen presentation and Image upload operations
  ProxyPass           /lool https://<internal IP>:9980/lool
  ProxyPassReverse    /lool https://<internal IP>:9980/lool
</VirtualHost>

Thank you all for the answers. Below is the configuration that made my system working; then I simply wrote https://office.mysite.com/collaboraoffice in collabora setup and everything kept working.

<IfModule mod_ssl.c>
   <VirtualHost _default_:443>

 ServerAdmin webmaster@mysite.com
 ServerName office.mysite.com
 DocumentRoot /var/www/html

 CustomLog /var/log/apache2/office.mysite.com-access.log combined
 ErrorLog /var/log/apache2/office.mysite.com-error.log

 RedirectMatch ^/$ https://office.mysite.com/nextcloud

 <Directory /var/www/html/>
   Options +FollowSymlinks
   AllowOverride All

  <IfModule mod_dav.c>
    Dav off
  </IfModule>

   SetEnv HOME /var/www/html
   SetEnv HTTP_HOME /var/www/html
 </Directory>

 <IfModule mod_headers.c>
      Header always set Strict-Transport-Security "max-age=15768000; preload"
 </IfModule>

 SSLEngine on
 SSLCertificateFile /usr/local/ssl/crt/office.mysite.com.crt
 SSLCertificateKeyFile /usr/local/ssl/crt/office.mysite.com.key
 SSLCertificateChainFile /usr/local/ssl/crt/office.mysite.comCABundle.crt

 # reverse proxy port 9980 collabora online
 AllowEncodedSlashes NoDecode
 SSLProxyEngine On
 ProxyPreserveHost On
 ProxyPass /loleaflet https://office.mysite.com:9980/loleaflet
 ProxyPassReverse /loleaflet https://office.mysite.com:9980/loleaflet

 ProxyPass /collaboraoffice https://office.mysite.com:9980
 ProxyPassReverse /collaboraoffice https://office.mysite.com:9980

 ProxyPass /hosting/discovery https://office.mysite.com:9980//hosting/discovery
 ProxyPassReverse /hosting/discovery https://office.mysite.com:9980/hosting/discovery

 # Main websocket
 ProxyPassMatch "/lool/(.*)/ws$" wss://office.mysite.com:9980/lool/$1/ws nocanon
 # Admin Console websocket
 ProxyPass   /lool/adminws wss://office.mysite.com:9980/lool/adminws

 # Download as, Fullscreen presentation and Image upload operations
 ProxyPass           /lool https://office.mysite.com:9980/lool
	 ProxyPassReverse    /lool https://office.mysite.com:9980/lool
 </VirtualHost>
</IfModule>