Nextcloud version (eg, 19.0.3.1):
Operating system and version (eg, Unraid 6.8.3):
Apache or nginx version (nginx runnin inside swag container - aka known as letsencrypt container made by linuxserver):
The issue you are facing:
I can’t set nextcloud for net access? (Lan access is working well).
Steps to replicate it:
- I created a subdomain cloud.mydomain.it and changed config.php in nextcloud folder and nextcloud.subdomain.conf in nginx folder under swag container using this config:
config.php
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'datadirectory' => '/data',
'instanceid' => 'ocz3l2jujtz6',
'passwordsalt' => 'xxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxx',
'trusted_domains' =>
array (
0 => 'xxxxxxxxxxxxxxx:444',
1 => 'cloud.xxxxxxxxxxxxxxx.it',
),
'dbtype' => 'mysql',
'version' => '19.0.3.1',
'dbname' => 'nextcloud',
'dbhost' => 'xxxxxxxxxxxxxxx:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'xxxxxxxxxxxxxxx',
'installed' => true,
'maintenance' => false,
'loglevel' => 2,
'mail_from_address' => 'admin',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'xxxxxxxxxxxxxxx.it',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtphost' => 'authsmtp.securemail.pro',
'mail_smtpport' => '465',
'mail_smtpauth' => 1,
'mail_smtpname' => 'xxxxxxxxxxxxxxx@xxxxxxxxxxxxxxx.it',
'mail_smtppassword' => 'xxxxxxxxxxxxxxx',
'mail_smtpsecure' => 'ssl',
'theme' => '',
'trusted_proxies' => ['swag'],
'overwrite.cli.url' => 'https://cloud.xxxxxxxxxxxxxxx.it/',
'overwritehost' => 'cloud.xxxxxxxxxxxxxxx.it',
'overwriteprotocol' => 'https',
);
nextcloud.subdomain.conf
# 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 cloud.*;
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 443;
set $upstream_proto https;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_max_temp_file_size 2048m;
}
}
Thank you in advance!