Hello,
after a few steps with the good documentation I was able to install a newly set up Nextcloud installation behind a reverse proxy. The access from web works wonderfully.
I also have Nextcloud Talk app and the associated STUN and TURN server. Everything works fine (video, screen sharing and calling) as long as I use the browser (on Windows and Android). But if I want to use the Android app, I don’t end up on the app settings but on the Nextcloud dashboard (see screentshot).
using android app after login
I am sure that something is wrong with the configuration, so here are the apache configurations and the config.php. I hope someone have a hint
The server ist running an a raspberry pi with the dietpi image.
Server 1 - reverse Proxy
Server 2 - Nextcloud running
Apache 2 Virtual Host of Server 1
<VirtualHost *:443>
ServerName *.*.*.eu
DocumentRoot /var/www/nextcloud/
ServerAdmin webmaster32@localhost
ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLProxyEngine On
ProxyPass / https://server2.ip.*.*/nextcloud/
ProxyPassReverse / https://server2.ip.*.*/nextcloud/
RewriteEngine On
RewriteRule ^/\.well-known/carddav https://*.*.*.eu/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav https://*.*.*.eu/remote.php/dav/ [R=301,L]
Header always set Strict-Transport-Security "max-age=31536000"
SSLCertificateFile /etc/letsencrypt/live/*.*.eu/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/*.*.eu/privkey.pem
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
Apache 2 Virtual Host of Server 2
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName *.*.*.eu
ServerAlias Server1.IP.*.*
DocumentRoot /var/www/
ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/*.*.eu/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/*.*.eu/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Config.php
<?php
$CONFIG = array (
'passwordsalt' => '*',
'secret' => '*',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '*',
),
'datadirectory' => '*',
'dbtype' => 'mysql',
'version' => '20.0.4.0',
'hashingThreads' => 4,
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => true,
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/run/redis/redis-server.sock',
'port' => 0,
),
'trusted_proxies' =>
array (
0 => 'Server1.IP.*.*',
1 => '*.*.*.eu',
2 => '*.*.eu',
),
'overwrite.cli.url' => 'https://localhost/',
'htaccess.RewriteBase' => '/nextcloud',
'overwritewebroot' => '/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => '*',
'dbpassword' => '*',
'installed' => true,
'instanceid' => '*',
'maintenance' => false,
'mail_smtpmode' => '*',
'mail_smtpsecure' => '*',
'mail_sendmailmode' => '*',
'mail_from_address' => '*',
'mail_domain' => '*',
'mail_smtpauth' => 1,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtphost' => '*',
'mail_smtpport' => '*',
'mail_smtpname' => '*',
'mail_smtppassword' => '*',
);
edit: I forgot to mention that the ports are of course enabled, the portforwarding for the turn server do not go through the reverse proxy but directly to the server 2 with the Nextcloud installation.