Problem: "Not Found" Error When Accessing Calendar via External Applications

Problem

Users are encountering a “Not Found” error when attempting to access their calendars via external applications. For instance, accessing a calendar through the URL https://ox.my.school/caldav/urkv392c93a results in a 404 error. Attempts to connect using clients like Thunderbird and Outlook also report that the calendar cannot be found.

Investigation

  1. Check the User Agent in Apache Access Logs:

    • Access the Apache access logs located at /var/log/apache2/access.log.
    • Identify the User Agent string associated with the calendar access attempts by searching for the specific URL or related entries.
  2. Verify User Agent in Apache Rewrite Rules:

    • Examine the Apache configuration file, typically found at /etc/apache2/sites-enabled/ox.conf.
    • Search for existing RewriteRules that may affect the identified User Agent:
      grep Rewrite /etc/apache2/sites-enabled/ox.conf
      
    • Determine if the User Agent from the access logs is accounted for in these rules.

Solution

  1. Update Apache Rewrite Rules:

    • If the User Agent identified during the investigation is not present in the existing RewriteRules, consider adding it to ensure proper handling of calendar access requests:
      ucr set ox/caldav/useragent/whitelist="$(ucr get ox/caldav/useragent/whitelist)|MyNewUserAgent" 
      
    • Replace MyNewUserAgent with your desired User Agent that you identified.
    • Be aware that identifying email clients based on header information can vary and is not always reliable. Some clients use headers like X-Mailer or other fields for identification.
  2. Reference User Agent Information:

  3. Test the Configuration:

    • After updating the RewriteRules, restart the Apache server to apply changes:
      sudo systemctl restart apache2
      
    • Test calendar access using the external applications to confirm that the “Not Found” error is resolved.

This topic was automatically closed after 24 hours. New replies are no longer allowed.