JupyterLab 3.6.x behind apache as reverse-proxy

Hi,

when upgrading JupterLab to 3.6.1, my setup stopped working when trying to open a document in a subfolder under the notebook-folder.

I found out that the YDoc-stuff encodes the “/” as %2F.
Therefore you need to tell apache to allow this with:
“AllowEncodedSlashes On”

Thus, my working version of this would be:
subpath :/root/
remote_host: 10.0.0.18:8080

# required for jupyterlab > 3.6
AllowEncodedSlashes On
RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /root/(.*) ws://10.0.0.18:8080/root/$1 [P,L]

<Location "/root/">
  require all granted
  # preserve Host header to avoid cross-origin problems
  ProxyPreserveHost on
  ProxyPass         http://10.0.0.18:8080/root/
  ProxyPassReverse  http://10.0.0.18:8080/root/
</Location>

Hope that helps anyone,

Christof