Not working with subdir and reverse proxy

Đang mở
#149 3 bình luận 7 reaction 0 người được giao Xem trên GitHub

@timar đang làm issue này rồi.

Từ ngày 1/11/2026.

  • #363 của @timar — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
nginx, php
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
PHP
Star
156
Fork
37
Merge trung bình
23 giờ 51 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CollaboraOnline/richdocumentscode

Tất cả issue của CollaboraOnline/richdocumentscode

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.