I am running Nextcloud in a Docker container and I am using my Apache server for SSL termination and proxying to the Docker container.
The proxy is working for most pages and resources, but there are some resources that aren’t being proxied correctly. I tried adding overridehost and overrideprotocol to config.php and that seems to fix the proxy issues, but then it takes pages ~45 seconds to load.
Does anyone have any suggestions to fix the performance issues when using overridehost? Below is my proxy configuration, any suggestions to fix this on the Apache side would be appreciated as well.
<VirtualHost *:443>
ServerName nextcloud.
SSLEngine on
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
Tried a fresh install of 20.0.4, but same problem.
It looks like something is calling a 45 second SLEEP SQL command.
Results from mysql SHOW FULL PROCESSLIST:
Id User Host db Command Time State Info Progress
604 nc_user localhost nextcloud Sleep 43 NULL 0.000
613 root localhost nextcloud Query 0 NULL show full processlist 0.000
Well I think I finally got the issue resolved. I switched my docker container from running Apache to NGINX and used the NGINX config file provided here:
That seemed to resolve the performance issues when using overwritehost/overwriteprotocol/etc.
The only issue I ran into was that the “All Contacts” link was not getting working properly, so I added a 301 redirect for https:///apps/contacts to https:///apps/contacts/
With those changes made I think everything is working now.