Hi all,
I’m looking for some help with what appears to be a webdav related issue on my new Nextcloud server.
I have a VPS hosting:
- a Wordpress website at mywebsite.com
- a Nextcloud server at mynextcloud.com/nc (note that Nextcloud root is hosted at a subfolder /nc although I don’t think that’s important here.)
OS: Ubuntu 16.04.5 LTS
Nextcloud version: 13.0.5.2
Server version: Apache/2.4.18
PHP version: 7.0.30
MySQL version: 5.7.23
config.php output:
<?php
$CONFIG = array (
'instanceid' => 'xxxxxxxxxxxxxxx',
'passwordsalt' => 'xxxxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxx',
'trusted_domains' =>
array (
0 => 'mynextcloud.com',
),
'datadirectory' => '/var/www/mynexcloud.com/nc/data',
'overwrite.cli.url' => 'https://mynextcloud.com/nc',
'dbtype' => 'mysql',
'version' => '13.0.5.2',
'dbname' => 'mydb',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'mydbuser',
'dbpassword' => 'xxxxxxxxxxxxxx',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
'memcache.locking' => '\\OC\\Memcache\\Redis',
'htaccess.RewriteBase' => '/nc',
'mail_from_address' => 'ncadmin',
'mail_smtpmode' => 'sendmail',
'mail_smtpauthtype' => 'LOGIN',
'mail_domain' => 'xxxxxx.com',
);
-
Nextcloud installation followed the guidance for manual installation at https://docs.nextcloud.com/server/13/admin_manual/installation/index.html
-
Both domains have Let’s Encrypt certificates
-
Nextcloud default encryption module is enabled
Pretty much everything seems to be working fine except for one thing. I want my Keepass password file synced on my NC instance and my various endpoints - PC, laptop, and Android devices. On Android I access it via the app Keepass2Android (the online version). This should be a simple process.
It should work like this:
- Open Keepass2Android on Android device
- select Open file
- select OwnCloud (there is no Nextcloud option but it works for both)
- enter https://mynextcloud.com/nc
- enter user name
- enter password
What should happen: It should then log in and show me the files on my NC instance for that account, and I should be able to navigate to the keepass.kdbx file and open it, allowing me to keep it syncronised between my device and NC server.
On the Keepass app, it should be possible to see that the app has connected to the file via the URL (this is what is seen after connecting via a snap instance rather than my manual install) :
https://mynextcloud.com/nc/remote.php/webdav/keepassfile.kdbx
What currently happens: I get this error message in the Keepass app:
Error - cannot connect to file provider service. Received unexpected response: Response{protocol=http/1.1,code=401, message=Unauthorized, url=https://mynextcloud.com/nc/remote.php/webdav}
This does not seem to be inherently a problem in Nextcloud. I have tested and confirmed this works perfectly when tested on a separate VPS instance on which the Nextcloud snap is installed. So it seems that it’s a configuration issue on my manual installation.
I have checked the apache2 logs for these access attempts
-
nothing is recorded in error.log
-
records are recorded in access.log Below are two attempts to connect via the above described process, a few minutes apart. Each attempt results in two lines (IP address and username replaced):
xx.xxx.xxx.xx - - [07/Aug/2018:09:56:01 +0000] "PROPFIND /nc/remote.php/webdav HTTP/1.1" 401 5069 "-" "okhttp/3.9.0"
xx.xxx.xxx.xx - username [07/Aug/2018:09:56:01 +0000] "PROPFIND /nc/remote.php/webdav HTTP/1.1" 401 1598 "-" "okhttp/3.9.0"
xx.xxx.xxx.xx - - [07/Aug/2018:10:05:43 +0000] "PROPFIND /nc/remote.php/webdav HTTP/1.1" 401 5073 "-" "okhttp/3.9.0"
xx.xxx.xxx.xx - username [07/Aug/2018:10:05:44 +0000] "PROPFIND /nc/remote.php/webdav HTTP/1.1" 401 1596 "-" "okhttp/3.9.0"
On the Logging page of my NC admin account, I also see this, twice:
Warning core Login failed: 'username' (Remote IP: 'xx.xxx.xxx.xx') 2018-08-07T11:05:44+0100
Warning core Login failed: 'username' (Remote IP: 'xx.xxx.xxx.xx') 2018-08-07T10:56:02+0100
As mentioned, this process works smoothly on a NC snap instance. My assumption then is that there is a configuration I need to adjust.
Can anyone advise what I might need to change to get this working?
Many thanks!