DAViCal
DAViCal is an Open-Source CalDAV and CardDAV server.
Setup
If you set up your DAViCal installation to be in your server's root path (i.e. http://[servername]/) CalDAV-Sync and CardDAV-Sync will automatically determine the location of your calendars and address books.
If you have installed DAViCal in some subdirectory (i.e. something like http://[servername]/davical/) the best way to deal with it is to set up a .well-known redirection. Please refer to well-known URLs in the DAViCal Wiki, on how to do that. Just in case you can not set up a well-known redirection, change to manual mode during account creation and enter the base URL of your installation. Both Apps should still be able to auto-detect your resources.
Troubleshooting
If CardDAV-Sync doesn't sync or you can not set up an account, make sure you didn't change the DAV headers. Go to your DAViCal configuration file and look for a line beginning with
$c->override_dav_header = "..."
If that line exists comment it out or make sure it contains "addressbook" and "calendar-access". CalDAV-Sync and CardDAV-Sync won't sync if a collection is not advertised as calendar or address book by those headers.