Hello. I'm trying to get the reverse proxy for the Nextcloud docker container working through swag. I was following the steps located at https://docs.linuxserver.io/general/swag#nextcloud-subdomain-reverse-proxy-example for setup. However, after I'm done, I'm still getting a 502 bad gateway. Any help would be appreciated. I am including both the swag config & the nextcloud config below
nextcloud.subdomain.conf
## Version 2020/12/09
# make sure that your dns has a cname set for nextcloud
# assuming this container is called "swag", edit your nextcloud container's config
# located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
# 'trusted_proxies' => ['swag'],
# 'overwrite.cli.url' => 'https://nextcloud.your-domain.com/',
# 'overwritehost' => 'nextcloud.your-domain.com',
# 'overwriteprotocol' => 'https',
#
# Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
# array (
# 0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
# 1 => 'nextcloud.your-domain.com',
# ),
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name home.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app nextcloud;
set $upstream_port 18443;
set $upstream_proto https;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_max_temp_file_size 2048m;
}
}
nextcloud's config.php
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'datadirectory' => '/data',
'instanceid' => 'oczev557ynye',
'passwordsalt' => 'wmc1ZRU+NWpNcgcYuvHtj8inWjqPou',
'secret' => '61yA7Ruh4yWk39ykw7EUZ9L2PcApyvYSdhYVn75Tf1/0A0m1',
'trusted_domains' =>
array (
0 => '192.168.1.115:444',
1 => 'home.snreloaded.stream:444',
2 => 'praemunio:444'
),
'dbtype' => 'mysql',
'version' => '20.0.1.1',
'overwrite.cli.url' => 'https://192.168.1.115:444',
'dbname' => 'nextcloud',
'dbhost' => '192.168.1.115:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'nextcloudROOT',
'installed' => true,
'filesystem_check_changes' => 1,
'trusted_proxies' => ['swag'],
'overwrite.cli.url' => 'https://home.snreloaded.stream/',
'overwritehost' => 'home.snreloaded.stream',
'overwriteprotocol' => 'https',
);
Also, I have a DD-WRT enabled router, with port-from being 80/443, & port-to being 1880/18443. The cert validation did succeed with this. I've tried running nextcloud with both port 443 & 444 for the config in unraid. Any help would be greatly appreciated!
Edit: As a followup to this, I now have no access to nextcloud whatsoever. I'm tempted to just drop the swag redirect, & just tell people "yes, it's really safe, trust me"