Nextcloudpi - Unable access Nextcloudpi after changing default ports 80 -> 8081 443 -> 8443

Support intro

Unable to connect on nextcloudpi.local:8081 and nextcloudpi.local:8443 I get an “unable to connect” message after change default ports.

Is there another file I need to change, perhaps in the redis server? It seems something in nextcloudpi configuration is refusing the connection?

Is there another file I need to modify. This was installed from nextcloudpi —> NextCloudPi_RPi_01-13-19.img from https://ownyourbits.com/downloads/

I am able to connect if I reset back to the default ports.

I didn’t change 4443 port and I am able to connect without issue https://nextcloudpi.local:4443/

Nextcloud version 15.0.2.0:
Operating system and version raspbian GNU/Linux 9 stretch
Apache 2.4.25 (Raspbian)
PHP version 7.2.13-1
|NextCloudPi version |v1.9.1|
|NextCloudPi image|NextCloudPi_01-14-19|
|distribution|Raspbian GNU/Linux 9 \n \l|

Unable to connect on nextcloudpi.local:8081 and nextcloudpi.local:8443 I get an “unable to connect” message after change default ports.

Change the appropriate settings in apache
ports.conf
000-default.conf
nextcloud.conf

Results from netstat. I am able to connect via telnet from another machine.

pi@nextcloudpi:~ $ sudo netstat -tulpn
Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1180/mysqld         
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      602/sshd            
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      972/master          
tcp6       0      0 :::8081                 :::*                    LISTEN      910/apache2         
tcp6       0      0 :::22                   :::*                    LISTEN      602/sshd            
tcp6       0      0 :::25                   :::*                    LISTEN      972/master          
tcp6       0      0 :::8443                 :::*                    LISTEN      910/apache2         
tcp6       0      0 :::4443                 :::*                    LISTEN      910/apache2         
udp        0      0 0.0.0.0:50569           0.0.0.0:*                           347/avahi-daemon: r 
udp        0      0 0.0.0.0:68              0.0.0.0:*                           543/dhcpcd          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           347/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                347/avahi-daemon: r 
udp6       0      0 :::44316                :::*                                347/avahi-daemon: r 

Able connect via telnet on port 8081 and port 8443

telnet nextcloudpi.local 8081
Trying 192.168.1.236...
Connected to nextcloudpi.local.
Escape character is '^]'.


telnet nextcloudpi.local 8443
Trying 192.168.1.236...
Connected to nextcloudpi.local.
Escape character is '^]'.


The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.lan',
    1 => '192.168.1.236',
    20 => 'xxx.ddns.net',
    21 => 'nextcloudpi.local',
  ),
  'datadirectory' => '/media/USBdrive/ncdata',
  'dbtype' => 'mysql',
  'version' => '15.0.2.0',
  'overwrite.cli.url' => 'http://localhost/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => 'xxx',
  'installed' => true,
  'instanceid' => 'ockhnd03zkvv',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'xxx',
  ),
  'tempdirectory' => '/media/USBdrive/ncdata/tmp',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'gmail.com',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'logfile' => '/media/USBdrive/ncdata/nextcloud.log',
  'loglevel' => '2',
  'log_type' => 'file',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '465',
  'mail_smtpname' => 'xxx@gmail.com',
  'mail_smtppassword' => 'xxx',
  'htaccess.RewriteBase' => '/',
);

The output of your Apache/system log in /var/log/____:

PASTE HERE