ServerRoot ${XDG_CONFIG_HOME}/user-share
PidFile pid
LockFile lock
LogLevel crit
#LogLevel info
ErrorLog log
DAVLockDB lock

LimitXMLRequestBody 100000

LoadModule dav_module ${HTTP_MODULES_PATH}/mod_dav.so
LoadModule dav_fs_module ${HTTP_MODULES_PATH}/mod_dav_fs.so
LoadModule authn_file_module ${HTTP_MODULES_PATH}/mod_authn_file.so
LoadModule auth_digest_module ${HTTP_MODULES_PATH}/mod_auth_digest.so
LoadModule authz_groupfile_module ${HTTP_MODULES_PATH}/mod_authz_groupfile.so
LoadModule dnssd_module ${HTTP_MODULES_PATH}/mod_dnssd.so

DNSSDEnable on
DNSSDAutoRegisterVHosts Off
DNSSDAutoRegisterUserDir Off

<VirtualHost *>
  DocumentRoot ${XDG_PUBLICSHARE_DIR}

  <Location />
    DAV On

    AuthType Digest
    AuthName "${GUS_LOGIN_LABEL}"
    AuthDigestDomain /

    AuthDigestProvider file
    AuthUserFile ${XDG_CONFIG_HOME}/user-share/passwd
    AuthGroupFile /usr/share/mate-user-share/dav_groupfile

    <IfDefine RequirePasswordAlways>
      Require user guest
      Require group guest
    </IfDefine>

    <IfDefine RequirePasswordOnWrite>
      <LimitExcept GET OPTIONS PROPFIND>
        Require user guest
        Require group guest
      </LimitExcept>
    </IfDefine>

    DNSSDServiceName "${GUS_SHARE_NAME}"
    DNSSDServiceTypes _webdav._tcp
    DNSSDServiceTxtRecord u=guest
  </Location>
</VirtualHost>

StartServers 1
MaxClients 3

<IfModule mpm_prefork_module>
  MinSpareServers 1
  MaxSpareServers 1
</IfModule>

<IfModule mpm_worker_module>
  MinSpareThreads 1
  MaxSpareThreads 1
  ThreadsPerChild 3
</IfModule>

<IfModule mpm_event_module>
  MinSpareThreads 1
  MaxSpareThreads 1
  ThreadsPerChild 3
</IfModule>