Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    kdav does not work with kweb

    General Discussion
    2
    4
    388
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • irreleph4nt
      irreleph4nt last edited by

      Hi,

      I have been trying to get kdav to work with kweb but it seems I am not understanding what the alias and folderish additions to caddy that you have created do.
      What I have in my extra.cfg is this, based on the help @longsleep provided to get the webapp to show up:

      alias /kdav/ /usr/share/webapps/kopano-kdav/
      fastcgi2 /kdav/ 127.0.0.1:9002 php {
        without /kdav/
        root /usr/share/webapps/kopano-kdav/
      }
      folderish /kdav
      

      Requests to https://<FQDN>/kdav/server.php however result in an XML error page like below:

      <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
      <script/>
      <s:sabredav-version>3.2.2</s:sabredav-version>
      <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
      <s:message>File not found: server.php in 'root'</s:message>
      </d:error>
      

      Adding an index server.php entry to my extra.cfg takes me to the login and the overview for SabreDAV when browsing to https://<FQDN>/kdav/.

      Anything beyond the SabreDAV overview however does not work. Clicking on any of the collections for example results in an XML error page again and the below shows up in the kweb request log:

      192.168.0.1 - - [02/Apr/2019:03:25:10 +0200] "GET /kdav/principals/testu/ HTTP/2.0" 404 38 "https://<FQDN>/kdav/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"
      

      I have found this example of how to make another DAV server (baikal) work with Caddy but that does not work because I can’t use another vhost / subdomain. I want to use the SSL certificate kweb obtains for my host via ACME. The solution relies on rewrites and redirects which do not work (?) when using your alias solution.

      I’d appreciate any assitance you can provide here. kdav itself works well when served with Apache on a different port.

      fbartels 1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels Kopano @irreleph4nt last edited by

        @irreleph4nt have you changed the config.php to reflect that you are running in a subdirectory?

        Regards Felix

        Resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        Support overview:
        https://kopano.com/support/

        irreleph4nt 1 Reply Last reply Reply Quote 0
        • irreleph4nt
          irreleph4nt @fbartels last edited by irreleph4nt

          @fbartels
          In the scenario of using kdav with kweb, the DAV URI in config.php is set to /kdav/.
          When using kdav with Apache, as this does not require a subfolder, it’s set to /. The Apache config works completely without issue.

          When configured for kweb, I can get to the sabreDAV login and overview by adding the index server.php line to my kdav alias in kweb’s extra.cfg. Using anything beyond the overview, like accessing /server.php directly or consequently /server.php/calendars/<user>/Kalender fails with the errors shown and logged that I pasted above.

          1 Reply Last reply Reply Quote 0
          • irreleph4nt
            irreleph4nt last edited by

            I have solved this; the current version of my extra.cfg and config.php can be found below. What helped me solve this was an issue on git for sabre.io/katana.

            One question that remains is this:
            How do I change my alias / folderish config so that kdav’s folder on the filesystem can be /usr/share/webapps/kopano-kdav/server.php but the service is accessible from https://<FQDN>/kdav/server.php instead? The way it is, my URL ends in kopano-kdav as well which does not look nice but at least it works.

            extra.cfg:

            alias /kopano-kdav/ /usr/share/webapps/kopano-kdav/
            fastcgi2 /kopano-kdav/ 127.0.0.1:9002 php {
            }
            folderish /kopano-kdav
            

            config.php

            // Location of the SabreDAV server.
            define('DAV_ROOT_URI', '/kopano-kdav/server.php');
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post