Lighttpd Nextcloud config

First of all, thanks a lot for this topic. I’ve been running Nextcloud on my Lighttpd server for some years now without any major issues, without having had any specific settings in my config. I was able to get rid of those .well-known warnings in the overview thanks to you guys though, and also applied the hardening tweaks.

I was wondering, has anyone successfully set up a Collabora Online Development Edition (CODE) server with Lighttpd as reverse proxy? I was trying to get it working yesterday but wasn’t able to. I was able to get Nextcloud to recognize the service and claim that it was working, but it didn’t open in the browser when opening a file. The loolwsd log was saying things like this:

ERR  Unknown resource: /xxxxxxx/loleaflet.html?WOPISrc=https%3A%2F%2F<myurl.tld>%2Fnc%2Findex.php%2Fapps%2Frichdocuments%2F%2Ffiles%2F2<userID>&title=<filename>&lang=en&closebutton=1&revisionhistory=1 , host: <myurl.tld>, path: 3
loolwsd[680281]: [0] 'xxxxxx'
loolwsd[680281]: [1] 'loleaflet.html'
loolwsd[680281]: [2] 'WOPISrc=https%3A%2F%2F<myurl.tld>%2Fnc%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F<userID>&title=<filename>&lang=en&closebutton=1&revisionhistory=1'
loolwsd[680281]: full URI: /xxxxxxx/loleaflet.html?WOPISrc=https%3A%2F%2F<myurl.tld>%2Fnc%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F2<userID>&title=<filename>&lang=en&closebutton=1&revisionhistory=1| wsd/LOOL>

I’m guessing my proxy server settings wasn’t correct. I have since deleted them from my config, but I was basically just guessing as to what would work based on the nginx and apache examples from this site and trying different things to no avail. If anyone has had success with this and knows a working config I would be very grateful.

To add something else to this topic, Lighttpd recently (in 1.4.56) enabled HTTP/2 support. It will be enabled by default in a future release but you can enable it manually currently by adding this to your config, as per the release notes:

server.feature-flags += ("server.h2proto" => "enable", "server.h2c" => "enable")

This could potentially speed up Nextcloud a bit more. Nextcloud recommends using HTTP/2 in their docs.

1 Like

Many thanks for sharing. Just for the Raspberry Pi and Debian users: This means it will be available in the upcoming (this summer) Debian (and Raspbian) Bullseye release.