Hi i am facing the problem that i am not able to connect to my nextcloud inside my network. Connection to my nextcloud from outside my network works fine…
I am running nextcloud on a FreeNas system. My Setup is as follows:
- I am having a nginx reverse proxy which is handling all the traffic and takes care for https certificate (IP:192.168.0.9)
- nextcloud is running on apache24. (IP: 192,168.0.10)
- on my router i have openned port 443 and 80 (tcp/udp)
I post my config files, so you can help me
config.php
<?php
$CONFIG = array (
'apps_paths' =>
array (
0 =>
array (
'path' => '/usr/local/www/nextcloud/apps',
'url' => '/apps',
'writable' => true,
),
1 =>
array (
'path' => '/usr/local/www/nextcloud/apps-pkg',
'url' => '/apps-pkg',
'writable' => false,
),
),
'overwriteprotocol' => 'https',
'logfile' => '/var/log/nextcloud/nextcloud.log',
'memcache.local' => '\\OC\\Memcache\\APCu',
'instanceid' => '---',
'passwordsalt' => '---',
'secret' => '---',
'trusted_domains' =>
array (
0 => '192.168.0.10',
1 => 'nextcloud.myserver.com,
),
'trusted_proxies' => ['192.168.0.9'],
'datadirectory' => '/mnt/data',
'dbtype' => 'mysql',
'version' => '20.0.12.1',
'overwrite.cli.url' => '192.168.0.10',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:/tmp/mysql.sock',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => '---',
'dbpassword' => '---',
'installed' => true,
'redis' =>
array (
'host' => '/tmp/redis.sock',
'port' => 0,
),
'memcache.locking' => '\\OC\\Memcache\\Redis',
'maintenance' => false,
'theme' => '',
'loglevel' => 0,
);
nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
# Redirect all HTTP traffic to HTTPS
server {
listen 80 default_server;
listen [::]:80;
return 301 https://$host$request_uri;
}
# Import server blocks for all subdomains
include "vdomains/*.conf";
}
and the vdomain.conf:
server {
listen 443 ssl http2;
server_name nextcloud.myserver.com;
access_log /var/log/nginx/nextcloud.access.log;
error_log /var/log/nginx/nextcloud.error.log;
include snippets/myserver.cert.conf;
include snippets/ssl-params.conf;
location / {
include snippets/proxy-params.conf;
proxy_pass http://192.168.0.10;
}
location /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
}
Thanks in advance for any help you can provide. In case you need any further information or clarification, just let me know
to make my point clear:
I am also not able to access my server from lan when trying :
- 192.168.0.10 → ERR_CONNECTION_REFUSED
- nextcloud.blendl.info → ERR_CONNECTION_TIMED_OUT
I allready found out that probably my router is the problem, but at least access via 192.168.0.10 should be possible …