Nextcloud version (eg, 20.0.5): 26.0.2.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu Server; Linux 5.15.0-73-generic x86_64
Apache version (eg, Apache 2.4.25): Apache/2.4.52 (Ubuntu)
NGINX version : Docker NGINX Proxy Manager
PHP version (eg, 7.4): 8.1.2
The issue you are facing:
My structure is this:
Router:443 > NGINX Reverse Proxy > Apache:4432 > Nextcloud
After changing my server’s setup so that an NGINX reverse proxy (in Docker) handles requests, when I enter the Nextcloud URL, I get forwarded to the the port that should be used in the background.
In other words, when I type this: https://nc.myserver.com/nextcloud
It turns my URL to: https://nc.myserver.com:4432/nextcloud/ (which fails to load any page)
Port 4432 is what Apache is listening on. The URL should mask that port and not show it to the end user (me).
Here is a diagram, if it helps communicate my setup:
I discovered that adding a trailing slash to the URL makes it function correctly. The issue is that the Nextcloud clients strip off the trailing slash, so I cannot even work around the problem.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
The output of your Nextcloud log in Admin > Logging:
Not sure where this is.
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'my_instance_id',
'passwordsalt' => 'some_salt_value',
'secret' => 'some_salt_value',
'trusted_domains' =>
array (
0 => 'myservername.local',
1 => '192.168.1.16',
2 => 'nc.myservername.com',
),
'datadirectory' => '/var/nextcloud-data/',
'dbtype' => 'mysql',
'version' => '26.0.2.1',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'ncloud-svc',
'dbpassword' => 'db_password',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\Redis',
'default_phone_region' => 'US',
'maintenance' => false,
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_smtpport' => '587',
'mail_from_address' => 'private',
'mail_domain' => 'private',
'mail_smtpauth' => 1,
'mail_smtpname' => '',
'mail_smtppassword' => '',
'mail_smtpauthtype' => 'LOGIN',
'app_install_overwrite' =>
array (
0 => 'nextant',
1 => 'files_fulltextsearch_tesseract',
2 => 'joplin',
3 => 'extract',
),
'theme' => '',
'loglevel' => 3,
'has_rebuilt_cache' => true,
'memories.exiftool' => '/var/www/html/nextcloud/apps/memories/exiftool-bin/exiftool-amd64-glibc',
'memories.ffmpeg_path' => '/usr/bin/ffmpeg',
'memories.ffprobe_path' => '/usr/bin/ffprobe',
'memories.transcoder' => '/var/www/html/nextcloud/apps/memories/exiftool-bin/go-vod-amd64',
'memories.no_transcode' => false,
'memories.qsv' => false,
'memories.gis_type' => 1,
'memories.vod.path' => '/var/www/html/nextcloud/apps/memories/exiftool-bin/go-vod-amd64',
'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
'memories.vod.ffprobe' => '/usr/bin/ffprobe',
'overwrite.cli.url' => 'https://nc.myserver.com/nextcloud/',
'overwritewebroot' => '/nextcloud',
'overwritehost' => 'nc.myserver.com:443',
);