LigHTTPd - DNS323 - ownCloud

Modify the lighttpd configuration. You have to enable the mod_redirect and redirect the carddav requests to the correct page in owncloud. This is required for the iPhone 3GS there is no possibility to set the whole URL. For iPad 2 and iPhone 5 you can set the complete path. Therefore the mod_redirect and the url.rewrite are only for the iPhone 3GS required. DAVdroid seems confused when redirected by lighttpd so excluded from redirection.

vi /etc/lighttpd/conf.d/owncloud.conf

# ownCloud specifics

server.modules += ( "mod_redirect" )

#Disable access to data folder
$HTTP["url"] =~ "^/owncloud/data/" {
     url.access-deny = ("")
   }

#Disable directory listing
$HTTP["url"] =~ "^/owncloud($|/)" {
     dir-listing.activate = "disable"
   }

$HTTP["useragent"] !~ "^DAVdroid" {
        url.redirect = (
                "^/\.well-known/carddav" => "/owncloud/remote.php/carddav",
                "^/\.well-known/caldav" => "/owncloud/remote.php/caldav"
        )
   }
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.