Hi guys,
After many agonising days of trying to set up Nextcloud server on Ubuntu 16.04, I humbly come to you for guidance. I don’t know where the problem is although I have tried implementing many solutions.
To sum up, I have installed Nextcloud 11.0.3 and now I can access the server from HTTP from all: LAN IP and Public IP.
The problem is that: I cannot access by HTTP-S the public IP of the server. However, there seems to be no problem accessing nextcloud server by HTTPS of the LAN IP. For the record, I have checked and I confirm that port-forwarding is functioning and port 443 is open, as I have double checked it.
Also, the checking of my IP server revealed so far:
a. www.sslabs.com returns the scan of my public IP with message: “No secure protocols supported”.
b. auto self certification command
sudo ./certbot-auto --apache --agree-tos --email example@yahoo.com --redirect -d example.asuscomm.com
returns with: “Failed to connect to xx.xx.xxx.xx:443 for tls-sni-01 challenge: Server only speaks HTTP, not TLS”.
By the way, my certificates are selfsigned with openssl.
And, finally, I mentioned I have created the bellow 2 vhosts files:
1. nextcloud_https.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin xxxxxxxxx@yahoo.com
ServerName example.asuscomm.com
DocumentRoot /var/www/nextcloud
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
<IfModule mod_headers.c>
# Header always set Strict-Transport-Security "max-age=15768000; preload"
Header always set Strict-Transport-Security "max-age=15768000;
</IfModule>
SSLEngine on
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
SSLHonorCipherOrder on
SSLCompression off
SSLSessionTickets off
SSLCertificateFile /etc/ssl/certs/example.asuscomm.com-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/example.asuscomm.com-selfsigned.key
</VirtualHost>
</IfModule>
2. nexcloud.conf
<VirtualHost *:80>
DocumentRoot "/var/www/nextcloud"
ServerName example.asuscomm.com
Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
Satisfy Any
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
And Nextcloud config.php is the following:
<?php
$CONFIG = array (
'instanceid' => 'oc56yzfz9v4x',
'passwordsalt' => 'jBRlxm7XlumdzS7J5hV+lLfp2FPQ/C',
'secret' => 'XlToSnjTZSGQZVdSaAKeSHXGahxzq+TtyhyXZlDQg09gY/4+',
'trusted_domains' =>
array (
0 => '192.168.1.205',
1 => 'example.asuscomm.com',
2 => 'xx.xxx.xx.xx.xx',
),
'datadirectory' => '/var/www/nextcloud/data',
'overwrite.cli.url' => 'https://example.asuscomm.com/nextcloud',
'dbtype' => 'mysql',
'version' => '11.0.3.2',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => 'xxxxxxxxxx',
'logtimezone' => 'UTC',
'installed' => true,
);
All other apache hosts: defaul-ssl.conf and 000-default.conf are disabled from loading.
Sorry for the long lecture, but could you please help me sort things out ?
I have previously tried Owncloud prior to using Nextcloud and I really hadn’t encounter this kind of issues.
Thank you so much !