Nextcloud version: 16.0.1
Operating system and version: Ubuntu 18.04
Apache version: 2.4.29
PHP version: 7.2.17
I’m trying to set up Collabora but have hit a roadblock that I think has to do with the apache reverse proxy. I’m running everything through Docker containers on a server running Ubuntu 18.04. For containers, I have one for my webserver running apache2 and letsencrypt, one for my nextcloud server which is reversed proxied through the webserver container. I then have another one for the Collabora server. I have a FQDN and I have nextcloud going through nextcloud.mysite.com and colloabora through collabora.mysite.com (A records). I can’t access collabora through collabora.mysite.com, I can only go though using https://127.0.0.1:9980. I can log into the admin panel if I do it through localhost or if I type in my servers ip:9980; when I go though https://collabora.mysite.com it points me to the /var/www/html folder on my webserver container. https://collabora.mysite.com:9980 just gives me an error saying the service in unavailable.
Below is a copy of my collabora.mysite.com.conf. I’ve tried many combinations following https://www.collaboraoffice.com/code/apache-reverse-proxy/, so I’ve tied it with the commented out sections active as well. I’ve also tried to replace 127.0.0.1 with the IP to my server and the IP of the collabora container, but each time is still points to the root of my webserver.
<VirtualHost *:443>
ServerName collabora.mysite.com:443
# DocumentRoot /var/www/html
Options -Indexes
ProxyRequests off
# SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/collabora.mysite.com/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/collabora.mysite.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/collabora.mysite.com/privkey.pem
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
SSLHonorCipherOrder on
# Encoded slashes need to be allowed
AllowEncodedSlashes NoDecode
# Container uses a unique non-signed certificate
SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
# keep the host
ProxyPreserveHost On
# static html, js, images, etc. served from loolwsd
# loleaflet is the client part of Collabora Online
ProxyPass /loleaflet https://127.0.0.1:9980/loleaflet retry=0
ProxyPassReverse /loleaflet https://127.0.0.1:9980/loleaflet
# WOPI discovery URL
ProxyPass /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery https://127.0.0.1:9980/hosting/discovery
# Capabilities
#ProxyPass /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0
#ProxyPassReverse /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities
# Main websocket
ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1/lool/$1/ws nocanon
# Admin Console websocket
ProxyPass /lool/adminws wss://127.0.0.1:9980/lool/adminws
# Download as, Fullscreen presentation and Image upload operations
ProxyPass /lool https://127.0.0.1:9980/lool
ProxyPassReverse /lool https://127.0.0.1:9980/lool
</VirtualHost>
My config.php
<?php
$CONFIG = array (
'instanceid' => 'oc4tfr1umn9y',
'passwordsalt' => 'e88o28XtEhjU/O707C7NtkyhbcQ2KZ',
'secret' => 'Jv7PaeEO/sdcuBCeh9vtlu0UFeIhD0m0mK6/JFtDkH8lZ6iT',
'trusted_domains' =>
array (
0 => 'nextcloud.mysite.com',
1 => 'myserverIP:10080',
),
'trusted_proxies' =>
array (
0 => 'nextcloud.mysite.com',
1 => 'myserverIP',
),
'datadirectory' => '/path/to/data',
'dbtype' => 'mysql',
'version' => '16.0.1.1',
'overwrite.cli.url' => 'https://nextcluud.mysite.com',
'overwriteprotocol' => 'https',
'dbname' => 'nc',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'user',
'dbpassword' => 'nicetry',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
'memcache.locking' => '\\OC\\Memcache\\Redis',
'mail_smtpmode' => 'smtp',
'mail_smtpauthtype' => 'LOGIN',
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
'twofactor_enforced' => 'false',
'twofactor_enforced_groups' =>
array (
),
'twofactor_enforced_excluded_groups' =>
array (
),
'mysql.utf8mb4' => true,
'has_rebuilt_cache' => true,
);
Here is my /var/log/error.log
:
[Sun Jun 16 12:05:16.003088 2019] [mpm_prefork:notice] [pid 503] AH00171: Graceful restart requested, doing restart
[Sun Jun 16 12:05:16.068739 2019] [mpm_prefork:notice] [pid 503] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g configured -- resuming normal operations
[Sun Jun 16 12:05:16.068753 2019] [core:notice] [pid 503] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 16 12:07:28.792395 2019] [mpm_prefork:notice] [pid 503] AH00171: Graceful restart requested, doing restart
[Sun Jun 16 12:07:28.839513 2019] [mpm_prefork:notice] [pid 503] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g configured -- resuming normal operations
[Sun Jun 16 12:07:28.839526 2019] [core:notice] [pid 503] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 16 12:09:15.333550 2019] [mpm_prefork:notice] [pid 503] AH00171: Graceful restart requested, doing restart
[Sun Jun 16 12:09:15.387545 2019] [mpm_prefork:notice] [pid 503] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g configured -- resuming normal operations
[Sun Jun 16 12:09:15.387558 2019] [core:notice] [pid 503] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 16 12:10:03.129766 2019] [mpm_prefork:notice] [pid 503] AH00171: Graceful restart requested, doing restart
[Sun Jun 16 12:10:03.176901 2019] [mpm_prefork:notice] [pid 503] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g configured -- resuming normal operations
[Sun Jun 16 12:10:03.176914 2019] [core:notice] [pid 503] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 16 12:11:20.329111 2019] [mpm_prefork:notice] [pid 503] AH00171: Graceful restart requested, doing restart
[Sun Jun 16 12:11:20.394695 2019] [mpm_prefork:notice] [pid 503] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g configured -- resuming normal operations
[Sun Jun 16 12:11:20.394708 2019] [core:notice] [pid 503] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 16 12:28:48.195648 2019] [proxy:error] [pid 4470] (111)Connection refused: AH00957: WSS: attempt to connect to collaboradockerIP:443 (*) failed
[Sun Jun 16 12:28:48.195701 2019] [proxy_wstunnel:error] [pid 4470] [client myexternalIP:1042] AH02452: failed to make connection to backend: collaboradockerIP
[Sun Jun 16 12:28:48.285572 2019] [proxy:error] [pid 4471] (111)Connection refused: AH00957: WSS: attempt to connect to collaboradockerIP:443 (*) failed
[Sun Jun 16 12:28:48.285614 2019] [proxy_wstunnel:error] [pid 4471] [client myexternalIP:1043] AH02452: failed to make connection to backend: collaboradockerIP
[Sun Jun 16 12:29:30.065137 2019] [proxy:error] [pid 4461] (111)Connection refused: AH00957: WSS: attempt to connect to collaboradockerIP:443 (*) failed
[Sun Jun 16 12:29:30.065193 2019] [proxy_wstunnel:error] [pid 4461] [client myexternalIP:1029] AH02452: failed to make connection to backend: collaboradockerIP
[Sun Jun 16 12:29:30.185148 2019] [proxy:error] [pid 4456] (111)Connection refused: AH00957: WSS: attempt to connect to collaboradockerIP:443 (*) failed
[Sun Jun 16 12:29:30.185207 2019] [proxy_wstunnel:error] [pid 4456] [client myexternalIP:1055] AH02452: failed to make connection to backend: collaboradockerIP
I was able to get collabora working for a bit if I set the collabora server to my serverIP:9980 and diabled certificate verification. It stopped working though and I now get the following error
[no app in context] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE `oc_addressbooks` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes at <<closure>>
0. /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 184
Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... s", Doctrine\DBAL\Dr ... ]})
1. /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 158
Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... s")
2. /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php line 178
Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "ALTER TABLE `oc ... ;", [])
3. /var/www/html/nextcloud/lib/private/Repair/Collation.php line 100
Doctrine\DBAL\Statement->execute()
4. /var/www/html/nextcloud/lib/private/Repair.php line 100
OC\Repair\Collation->run(OC\Repair {})
5. /var/www/html/nextcloud/core/Command/Maintenance/Repair.php line 123
OC\Repair->run()
6. /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php line 255
OC\Core\Command\Maintenance\Repair->execute(Symfony\Componen ... {}, Symfony\Componen ... {})
7. /var/www/html/nextcloud/3rdparty/symfony/console/Application.php line 901
Symfony\Component\Console\Command\Command->run(Symfony\Componen ... {}, Symfony\Componen ... {})
8. /var/www/html/nextcloud/3rdparty/symfony/console/Application.php line 262
Symfony\Component\Console\Application->doRunCommand(OC\Core\Command\Maintenance\Repair {}, Symfony\Componen ... {}, Symfony\Componen ... {})
9. /var/www/html/nextcloud/3rdparty/symfony/console/Application.php line 145
Symfony\Component\Console\Application->doRun(Symfony\Componen ... {}, Symfony\Componen ... {})
10. /var/www/html/nextcloud/lib/private/Console/Application.php line 213
Symfony\Component\Console\Application->run(Symfony\Componen ... {}, Symfony\Componen ... {})
11. /var/www/html/nextcloud/console.php line 97
OC\Console\Application->run()
12. /var/www/html/nextcloud/occ line 11
undefinedundefinedrequire_once("/var/www/html/nextcloud/console.php")
at 2019-06-22T14:36:52+00:100:
Any help on this would be appreciated. Thanks.