Unable to access files with FQDN, but can with IP

When I attempt to access the url:

I get a list of all my files.

But when I try to get to it via my domain url:


It sits there. I check chrome console, and I’m getting this error:

client.js?v=f57a764…:245 Uncaught (in promise) TypeError: Cannot read property 'substr' of undefined
    at Client._parseFileInfo (client.js?v=f57a764…:245)
    at client.js?v=f57a764…:367
    at Function._.map._.collect (underscore.js?v=f57a764…:172)
    at Client._parseResult (client.js?v=f57a764…:366)
    at client.js?v=f57a764…:428
    at <anonymous>

Which points to this line:

		 * Parse Webdav result
		 * @param {Object} response XML object
		 * @return {Array.<FileInfo>} array of file info
		_parseFileInfo: function(response) {
			var path = response.href;
			if (path.substr(0, this._root.length) === this._root) { <--this line right here.

So, I went to the server settings and I’m seeing this:

Your web server is not yet set up properly to allow file synchronization because the WebDAV interface seems to be broken.

But when I run it with the IP address, it works.

Here is my config.php:

$CONFIG = array (
  'instanceid' => 'my instance id',
  'passwordsalt' => 'a salt goes here',
  'secret' => 'long secret goes here',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'redis-cluster.mylocal.domain',
    'port' => '6380',
  'trusted_domains' =>
  array (
    0 => 'cloud.mydomain.com',
    1 => '',
  'datadirectory' => '/mnt/cloud',
  'overwrite.cli.url' => '',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'my_password',
  'logtimezone' => 'UTC',
  'installed' => true,
  'user_backends' =>
  array (
    0 =>
    array (
      'class' => 'OC_User_Zimbra',
      'arguments' =>
      array (

Here is the apache config:

Alias / "/var/www/nextcloud/"

<Directory /var/www/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off

 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud


Here are the apache mods that I had enabled during install:

a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
a2enmod setenvif

I have disabled the zimbra drive module as well, and it does not affect anything.

It also does this via http, and https

I’m running version 11.0.3 (I can’t run 12 due to zimbra drive module does not work otherwise I would)

Any thoughts on what is causing this?

You’re overwriting the URL with that of your internal address. I’d say normally better to do the opposite and put in a DNS oveerride on the local network to point back to the NC server.

Worse, if you’re coming over HTTPs this may definitely cause problems as you’re forcing HTTP.

May not be the problem, but I wouldn’t dismiss it first.

Thank you for the response.

I changed it to https://cloud.mydomain.com and even http (for testing), and this did not resolve the issue. I even removed the line from the config.


Found the problem. Our firewall appliance was blocking the webdav via the PROPFIND tag.

Thanks for your help on this.

1 Like

At least we proactively solved a config issue in the process, eh? :wink:

1 Like