Not working with subdir and reverse proxy

Offen
#149 3 Kommentare 7 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

@timar arbeitet bereits daran.

Seit 01.11.2026.

  • #363 von @timar — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
nginx, php
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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! 😄

Vorherrschende Sprache
PHP
Sterne
156
Forks
37
Ø Merge
23 Std. 51 Min.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CollaboraOnline/richdocumentscode

Alle Issues in CollaboraOnline/richdocumentscode

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.