Not working with subdir and reverse proxy

Ouverte
#149 3 commentaires 7 réactions 0 personnes assignées Voir sur GitHub

@timar y travaille déjà.

Depuis le 1/11/2026.

  • #363 par @timar — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
nginx, php
Domaine
backend

Piste de recherche

Start by reviewing the reported config/config.php proxy and subpath settings, the nginx location block, and the proxy.php request URL. Compare the generated URLs with the occ config:app:get richdocuments wopi_url output. Done means requests for the Collabora proxy stay under /nc/apps/ instead of dropping the subdirectory.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Hi,
I am using the Collabora online CODE server installed over nextcloud on arm64.
The nextcloud is hosted on apache2 and accessible over a subdir like mydoman.tld/nc through a nginx reverse proxy.
Accessing the nextcloud and all other apps is no problem, but collabora code just wont load correctly, because it tries to access the proxy.php file the second and next requests over domain.tld/apps/... instead of domain.tld/nc/apps/...
If I run: php occ config:app:get richdocuments wopi_url it gives me the correct url with the subfolder.

It looks like this when trying to access the example file (https://domain.tld/nc/apps/richdocumentscode_arm64/proxy.php?req=/loleaflet/dist/loleaflet.html?file_path=file:///opt/libreoffice/online/test/data/hello-world.odt):
grafik

The nextcloud is configured in config/config.php for the proxy and subpath:

  [...]
  'overwriteprotocol' => 'https',
  'overwritehost' => 'domain.tld:443',
  'overwritewebroot' => '/nc',

Also nc reports, that collabora online is accessible in the settings.
nginx is configured like this:

location ^~/nc/ {
         rewrite /nc(.*) $1 break;
        [...]
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_pass http://127.0.0.1:4000;
}

Maybe I am missing an important setting here...

Thanks for your help! 😄

Langage dominant
PHP
Étoiles
156
Forks
37
Merge moyen
23 h 51 min
PR mergées (30 j)
2

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de CollaboraOnline/richdocumentscode

Toutes les issues de CollaboraOnline/richdocumentscode

Issues similaires

Plus d'issues PHP

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.