Open n-greene opened 1 year ago
Built in CODE server is a simple testing ground for users, not meant to be used with complex reverse proxy for many. There are CODE packages and docker for that. While your report is admirable, it can hardly be resolved here as a support. lool is strange. Did you finally find a solution>
I am running NC 27.02 php8.1.2 pgsql15.4 with ssl termination in haproxy. OS Linux 5.15.0-79-generic x86_64 Ubuntu 22.04.3 LTS NC Office 8.1.1 CODE server 23.5.202
I am using the built in CODE server and currently it opens documents every third or fourth try.
I have wrestled with my Apache2 Virtualhost conf to get to this point. I was previously running Office/Built in CODE behind an NGINX reverse proxy with ssl termination and did not need any proxy directives in virtual host. I cannot be exact but it seemed like the trouble started before I switched over to Haproxy but I would not be able to pinpoint the versions of CODE and NC Office that changed with (last 3 months estimate) but I do keep everything updated at all times, for better or for worse.
Suffice it to say that what I have put in the current virtual host has been sufficient to get NC office to launch, at all, but not consistently or reliably. I would like to see the NC Office/Built in CODE working as it was.
In NC logs the following error shows up periodically, it references
req=/lool/convert-to/png
which I believe is an obsolete setting for CODE, being superceded bycool
so I am not sure why this is still being referenced as I do have an up to date install.[richdocuments] Info: GuzzleHttp\Exception\ServerException: Server error:
POST https://xxx.xxxx.net/apps/richdocumentscode/proxy.php?req=/lool/convert-to/pngresulted in a
502 Bad Gateway` response:502 Bad Gateway
The server returned an invalid or incomplete response.at <>
GET /index.php/core/preview?forceIcon=0&a=0&c=07044c766b4e1f3ba7c2e17f201ee4f3&x=250&y=250&fileId=1270797 from 192.168.10.1 by xxxat 2023-08-16T13:00:39+00:00'
My Apache 2 virtual host is configured:
`<VirtualHost *:80> ServerName xxx.xxxx.net ServerAdmin xxxx@xxx.xxxxx.net DocumentRoot /var/www/html/nextcloud ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
RequestHeader set X-FORWARDED-PROTOCOL https RequestHeader set X-Forwarded-Ssl on
AllowEncodedSlashes NoDecode ProxyAddHeaders On Proxypreservehost On LimitRequestBody 0 KeepAlive On
Redirect 301 /.well-known/carddav https:/xxx.xxxxx.nett/remote.php/dav Redirect 301 /.well-known/caldav https://xxx.xxxxx.net/remote.php/dav Redirect 301 /.well-known/webfinger https://xxx.xxxxx.net/index.php/.well-known/webfinger Redirect 301 /.well-known/nodeinfo https://xxx.xxxxx.net/index.php/.well-known/nodeinfo `
The
Redirect 301
entries are for carddav and caldav to work behind haproxy, which they do.Remedies attempted, based on searching for solutions:
I have tried setting WOPI to 0.0.0.0/0 I have tried remove/reinstall Built in CODE and NC Office, whilst running sudo killall coolswd in the interim I have tried selecting 'Use your own server' and then clicking back on the 'Use the built-in CODE' button which results in being able to open a document, but then lapses into failing to launch Nextcloud office. If I try opening the document three or four times it will open. I can see previews of the document type and when I do get a document open I can save.
The apache2 virtual host settings are probably going to upset someone, but I just went through ANYTHING I could find on this subject and tried it out - obviously explicit reverse proxy directives break apache because I am not running CODE on a separate server - I just left in stuff which did not throw an error on restarting apache2 - feel free to comment on unnecessary entries, I just could not find any documentation explicitly for built in CODE server.