I setup the following docker container:
- nextcloud
- nextcloudpi
- reverse-proxy
- sharelatex (not important, just for testing)
I configured the reverse-proxy so that is redirects subdomains of my main domain to the other docker container. Its working well for nextcloud and sharelatex, but not for nextcloudpi. How do I configure it correctly?
nextcloudpi logs:
$ sudo docker logs nextcloudpi
Initializing empty volume..
stopping Cron...
cron: no process found
Stopping apache
httpd (no pid file) not running
Stopping PHP-fpm
Making /usr/local/etc/ncp-config.d persistent ...
Making /etc/services-enabled.d persistent ...
Making /etc/letsencrypt persistent ...
Making /etc/shadow persistent ...
Making /etc/cron.d persistent ...
Making /etc/cron.daily persistent ...
Making /etc/cron.hourly persistent ...
Making /etc/cron.weekly persistent ...
Making /usr/local/bin persistent ...
Making /etc/apache2 persistent ...
Starting PHP-fpm
Starting Apache
Starting mariaDB
2022-07-10 7:33:23 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 109 ...
2022-07-10 7:33:23 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
2022-07-10 7:33:23 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
2022-07-10 7:33:23 0 [Note] InnoDB: Uses event mutexes
2022-07-10 7:33:23 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-07-10 7:33:23 0 [Note] InnoDB: Number of pools: 1
2022-07-10 7:33:23 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2022-07-10 7:33:23 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2022-07-10 7:33:23 0 [Note] InnoDB: Using Linux native AIO
2022-07-10 7:33:23 0 [Note] InnoDB: Initializing buffer pool, total size = 268435456, chunk size = 134217728
2022-07-10 7:33:23 0 [Note] InnoDB: Completed initialization of buffer pool
2022-07-10 7:33:23 0 [Note] InnoDB: 128 rollback segments are active.
2022-07-10 7:33:23 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-07-10 7:33:23 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-07-10 7:33:23 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-07-10 7:33:23 0 [Note] InnoDB: 10.5.15 started; log sequence number 1218587; transaction id 1841
2022-07-10 7:33:23 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-07-10 7:33:23 0 [Note] InnoDB: Loading buffer pool(s) from /data/database/ib_buffer_pool
2022-07-10 7:33:23 0 [Note] Server socket created on IP: '127.0.0.1'.
2022-07-10 7:33:23 0 [Note] Reading of all Master_info entries succeeded
2022-07-10 7:33:23 0 [Note] Added new Master_info '' to hash table
2022-07-10 7:33:23 0 [Note] mysqld: ready for connections.
Version: '10.5.15-MariaDB-0+deb11u1' socket: '/run/mysqld/mysqld.sock' port: 3306 Debian 11
2022-07-10 7:33:24 0 [Note] InnoDB: Buffer pool(s) load completed at 220710 7:33:24
Starting Redis
Starting Cron
Starting Postfix
Provisioning
Provisioning Redis password
Updating NextCloud config with Redis password
Provisioning MariaDB password
Updating NextCloud config with MariaDB password
Running nc-limits
Using 6159691776B for PHP
Using 6 PHP threads
Using 2002898944 memory for the database
2022-07-10 7:33:26 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
2022-07-10 7:33:26 0 [Note] Event Scheduler: Purging the queue. 0 events
2022-07-10 7:33:26 0 [Note] InnoDB: FTS optimize thread exiting.
2022-07-10 7:33:26 0 [Note] InnoDB: Starting shutdown...
2022-07-10 7:33:26 0 [Note] InnoDB: Dumping buffer pool(s) to /data/database/ib_buffer_pool
2022-07-10 7:33:26 0 [Note] InnoDB: Buffer pool(s) dump completed at 220710 7:33:26
2022-07-10 7:33:27 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-07-10 7:33:27 0 [Note] InnoDB: Shutdown completed; log sequence number 1218599; transaction id 1844
2022-07-10 7:33:27 0 [Note] mysqld: Shutdown complete
Stopping MariaDB database server: mariadbd.
Starting MariaDB database server: mariadbd.
Stopping redis-server: redis-server.
Starting redis-server: redis-server.
Starting notify_push daemon
Configuring Domain
System config value trusted_domains => 11 set to string 91.41.176.203
System config value trusted_domains => 1 set to string 172.21.0.7
System config value trusted_domains => 14 set to string dba6200a3c81
System config value trusted_domains => 6 set to string 192.168.103.34
Nextcloud version 23.0.2.1. NextCloudPi version v1.47.2
Init done
error messag ein chromium:
This page isn’t working cloud.bardhome.eu redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
config.php (censored some parts of course)
<?php
$CONFIG = array (
'passwordsalt' => '**deleted**',
'secret' => '**deleted**/',
'trusted_domains' =>
array (
0 => 'localhost',
7 => 'nextcloudpi',
5 => 'nextcloudpi.local',
8 => 'nextcloudpi.lan',
3 => 'nextcloudpi',
11 => '91.41.176.203',
1 => '172.21.0.7',
14 => 'dba6200a3c81',
6 => '192.168.103.34',
),
'datadirectory' => '/data/nextcloud/data',
'dbtype' => 'mysql',
'version' => '23.0.2.1',
'overwrite.cli.url' => 'https://nextcloudpi/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'ncadmin',
'dbpassword' => '**deleted**',
'installed' => true,
'instanceid' => 'oca6ngd07z8y',
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0.0,
'password' => '**deleted**',
),
'tempdirectory' => '/var/www/nextcloud/data/tmp',
'mail_smtpmode' => 'sendmail',
'mail_smtpauthtype' => 'LOGIN',
'mail_from_address' => 'admin',
'mail_domain' => 'ownyourbits.com',
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'jpeg_quality' => '60',
'overwriteprotocol' => 'https',
);
reverse-proxy config:
server {
listen 443 ssl;
listen [::]:443;
include snippets/self-signed.conf;
include snippets/ssl-params.conf;
server_name cloud.bardhome.eu;
location / {
proxy_read_timeout 1800;
proxy_connect_timeout 1800;
proxy_send_timeout 1800;
send_timeout 1800;
proxy_buffering off;
proxy_set_header Host $http_host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
# proxy_set_header Host $http_host;
client_max_body_size 25G;
proxy_pass http://nextcloudpi/;
}
}