Hi,
I am using Nextcloud (VM2 Ubuntu Server 20.04.4) instance behind reverse Nginx proxy (Ubuntu Server 20.04.4 VM1).
My Nginx VM1 proxy config SSL certificate:
server {
listen 443 ssl;
server_name cloud.mydomain.net;
client_max_body_size 0;
access_log /var/log/nginx/cloud-access.log;
error_log /var/log/nginx/cloud-error.log;
proxy_buffering off;
location / {
proxy_pass http://Nextcloud VM2 internal IP:80;
}
ssl_certificate /etc/letsencrypt/live/cloud.mydomain.net/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/cloud.mydomain.net/privkey.pem; # managed by Certbot
}
My Nextcloud VM2 config:
<?php
$CONFIG = array (
'instanceid' => 'oc9448kkcp78',
'passwordsalt' => 'h03sH/4g8gdgwfncmHDW96EYdTLw58',
'secret' => 'ywH3QINeyhrnGEZrbmdBaiKobsi81A6T+8LXPt/scvgMnpDQ',
'trusted_domains' =>
array (
0 => 'nextcloud VM2 IP',
1 => 'my.domain.net'
),
'datadirectory' => '/var/www/html/nextcloud/data',
'dbtype' => 'mysql',
'version' => '22.0.0.11',
'overwrite.cli.url' => 'http://nextcloud VM2 IP/nextcloud',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'user',
'dbpassword' => 'password',
'installed' => true,
);
When i try to access from out side by typing in adress bar adress: my.domain.net, i get an error "host 192.168.1 (nextcloud VM2 IP) is taking to long to respond (connection timed out).
When i try to access this from my internal network, i type my.domain.net in adress bar and immediately get a response, my nextcloud is asking for login and working normaly.
Ports 443 and 80 ports are forwarded to my Nginx reverse proxy VM.
I do not now what am i doing wrong. Thank you for all your help.