Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Publish iCal calendars with local WebDAV server Apps
To publish your iCal Calendar with the bundled OS X Apache web server, edit Apache's configuration file in /etc/httpd. You must be root, so I expect you know vi and the workings of this file in general.
 % sudo vi /etc/httpd/htttpd.conf
Read the rest for the specific edits...

In the Shared Library section, where modules are loaded, add these two lines in the same ordering in their repective sections:
LoadModule dav_module libexec/httpd/libdav.so 
AddModule mod_dav.c
Then somewhere in the global section add:
DAVLockDB /Library/WebServer/davlocks/DAVLockDB
I used this section to have a webdav folder managed by Apache:
<Directory "/Library/WebServer/Documents/dav">
DAV On
AuthName 'WebDAV'
AuthType Basic
AuthUserFile /etc/httpd/.htpasswd
AuthGroupFile /dev/null
<LimitExcept GET HEAD OPTIONS>
require valid-user
</LimitExcept>
</Directory>
I want this folder protected (somewhat) by a password. To generate the password file
with MD5 passwords (not that old crypt!), please use the -m flag. The file is text. Note that http is vulnarable to sniffing attacks, so someone on your network can get at your password.
 % htpasswd -m -c /etc/httpd/.htpasswd user
New password: not_safe
Re-type new password: not_safe
Adding password for user user
Then set up the folder with permissions.
 % cd /Library/WebServer/ 
% mkdir davlocks
% chown www:www davlocks
% cd Documents
% mkdir dav
% chown www:www dav
In iCal, choose Publish Calendar and specify http://localhost/dav/iCal. Do not FTP stuff into the dav folder; webdav uses its own locking, don't confuse it.

Good Luck!

[Editor's note: I have not yet tried this one out...]
    •    
  • Currently 2.75 / 5
  You rated: 3 / 5 (12 votes cast)
 
[185,963 views]  

Publish iCal calendars with local WebDAV server | 90 comments | Create New Account
Click here to return to the 'Publish iCal calendars with local WebDAV server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
FINK?
Authored by: kerim on Sep 12, '02 10:45:13AM

FINK doesn't seem to have the webDAV module installed. Does anyone know if this will work if you are using the FINK version of Apache instead of the built-in version?

PS: there is more on this in the forums where I posted a message yesterday...



[ Reply to This | # ]
authentication
Authored by: Harold on Sep 12, '02 11:24:32AM

AuthGroupFile /dev/null is not needed

You should add the following line though:
require valid-user



[ Reply to This | # ]
Re: authentication
Authored by: Harold on Sep 12, '02 11:25:51AM

silly me, didn't read the tip carefully, valid-user is there, sorry.



[ Reply to This | # ]
Typo!
Authored by: MacDude on Sep 12, '02 12:30:41PM
Watch out for the typo in the first line. The file you edit is /etc/httpd/httpd.conf (The text above has an extra 'T'.)

[ Reply to This | # ]
PROPFIND
Authored by: Riken on Sep 12, '02 01:11:49PM

This setup is fine if you just want others to download files, but if you want them to be able to view directory listings you need to add PROPFIND to the list of LimitExceptions like so:

<LimitException GET HEAD OPTIONS PROPFIND>

I'm not sure of the exact security concerns about using PROPFIND apart from the fact that all the files in the DAV secured directory can be listed.



[ Reply to This | # ]
not just vi
Authored by: smith on Sep 12, '02 03:35:28PM

Thanks for that great tip.

As with any situation in which test files are to be edited, "vi" is only one of many editors available. The venerable emacs is installed in os 10 as well as the (much simpler) pico.

...r



[ Reply to This | # ]
not just vi
Authored by: theMaker on Sep 13, '02 06:13:00PM

This is prolly not the best place to open up that can o' worms...



[ Reply to This | # ]
Grrrr...
Authored by: schmelding on Sep 12, '02 04:11:43PM

After following these instructions I "apachectl graceful" to restart my server. It wouldn't restart. So I ran "apachectl configtest" which gave me the following:

Syntax error on line 190 of /etc/httpd/httpd.conf:
Invalid command 'DAVLockDB', perhaps mis-spelled or defined by a module not included in the server configuration



[ Reply to This | # ]
Grrrr...
Authored by: maclaxguy on Sep 12, '02 06:22:05PM

Same here.....



[ Reply to This | # ]
Grrrr...
Authored by: matx on Sep 12, '02 06:25:33PM

i get the same thing. any fixes?



[ Reply to This | # ]
can anyone help us out here
Authored by: c.i.t on Sep 12, '02 08:37:55PM

I'm getting the same problem...anyone?



[ Reply to This | # ]
Try this...
Authored by: ehowe on Sep 12, '02 09:03:18PM
I was having the same problem until I did this: Try moving the DAVLockDB /Library/WebServer/davlocks/DAVLockDB line to below all the AddModule statements.

[ Reply to This | # ]
Thanks, it worked
Authored by: mrgerbek on Sep 12, '02 11:59:13PM

I moved it below the Add_modules section, and it worked.



[ Reply to This | # ]
Worked for me
Authored by: raster on Sep 12, '02 04:54:22PM

I had no problem setting things up.

I did however just do it for a test, and did not do the password stuff.

Of course I'm used to configuring apache...



[ Reply to This | # ]
Virtual Hosts & WebDAV
Authored by: dawho9 on Sep 12, '02 04:55:53PM

Do you have to do something else if you use <VirtualHost *>'s? I followed the directions to a "T". Apache starts fine, but when I attempt to access the page, I get 403 forbidden.

Thanks



[ Reply to This | # ]
Virtual Hosts & WebDAV
Authored by: P3tAfl0P on Aug 14, '08 06:45:28AM

Have you checked on the directory permissions?
The standard <directory> is locked down in httpd.conf
If you set up for instance a virtual host, you also have to
assign individual access for the corresponding directory.

You could take the standard /Library/WebServer/Documents
directory as an example. It is directly defined in httpd.conf


---
---
>Xposure



[ Reply to This | # ]
Awesome
Authored by: seamusmh on Sep 12, '02 05:33:52PM

Thank you thank you thank you

I spent about 3 hours trying to make this work last night, but I just couldn't get the dav module to load based on the directions at stepwise, compiling the source from the webdav.org web site was a catastrophe for a newbie like myself

Along with an account at dyndns.org I have my own .mac server right at home, almost... I can use Timbuktu for remote control, file transfer, etc. Hopefully future versions of iPhoto will allow publishing on remote servers other than .mac as well. Fun stuff for geeks

Does anyone know how I can turn my dav folder that was created for iCal into something remotely mountable (like iDisk?). Maybe the .Net integrated services backlask will be so great that we can get to set our .mac servers to anything we wish at the os level...



[ Reply to This | # ]
Awesome
Authored by: BiTurbo27t on Feb 18, '03 01:16:21AM

"Does anyone know how I can turn my dav folder that was created for iCal into something remotely mountable (like iDisk?). Maybe the .Net integrated services backlask will be so great that we can get to set our .mac servers to anything we wish at the os level..."

Easy enough. In finder under the Go menu, use connect to server (or just hit command-k) and type "http://yourserver/dav/" You'll be prompted for your name and pw. It will then mount just like iDisk.



[ Reply to This | # ]
Not working for me.
Authored by: steffi on Sep 12, '02 09:13:50PM

I followed the instructions to the letter with obvious typos corrected but
I get cannot publish calendar's in ical and I get errors such as

[Fri Sep 13 07:39:52 2002] [error] [client 127.0.0.1] File does not exist: /Library/WebServer/Documents/dav/iCal//
[Fri Sep 13 07:39:52 2002] [error] [client 127.0.0.1] File does not exist: /Library/WebServer/Documents/dav/iCal/Home.ics

in my apache logs.



[ Reply to This | # ]
I love this!
Authored by: nosaj56 on Sep 12, '02 11:03:28PM

I love my new WebDav Server!



[ Reply to This | # ]
Problems viewing schedule
Authored by: mkinney on Sep 12, '02 11:23:57PM

Followed the directions but this is what I get when I try to view my published schedule:


BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Apple Computer\, Inc//iCal 1.0//EN
X-WR-CALNAME;VALUE=TEXT:Study
X-WR-TIMEZONE;VALUE=TEXT:US/Central
X-WR-RELCALID;VALUE=TEXT:61153349-C689-11D6-8D1D-003065C2B2C0
VERSION:2.0
BEGIN:VEVENT
UID:6115264E-C689-11D6-8D1D-003065C2B2C0
DTSTAMP:20020912T184020Z
SUMMARY:Study Time
DTSTART;TZID=US/Central:20020912T150000
DTEND;TZID=US/Central:20020912T173000
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TH
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20020912T184055Z
SUMMARY:Study Time
DTEND;TZID=US/Central:20020912T100000
UID:61152D3E-C689-11D6-8D1D-003065C2B2C0
DTSTART;TZID=US/Central:20020912T080000
END:VEVENT
END:VCALENDAR

Any help would be very much appreciated.



[ Reply to This | # ]
Problems viewing schedule
Authored by: professor on Sep 12, '02 11:33:42PM

That's what you saw when you viewed the page in a web browser?

Exactly what you should have seen, according to the iCal help file.

You should have no trouble subscribing to the calendar from another copy of iCal (or, in principle, another webDAV enabled calendar program).



[ Reply to This | # ]
Disregard. I misunderstood the end result of this hint.
Authored by: mkinney on Sep 12, '02 11:37:08PM

Sorry, I'm dumb. I was under the impression that I would be able to view my schedules via the web.



[ Reply to This | # ]
Disregard. I misunderstood the end result of this hint.
Authored by: BiTurbo27t on Feb 18, '03 01:19:44AM

You can view your files via a browser on you own webDAV server with the help of an awesome PHP package, PHPiCalendar. Just activate PHP on your server if you haven't already and go here to grab the package and get lots of good info and help. Works great!

http://phpicalendar.sourceforge.net/nuke/



[ Reply to This | # ]
Problems viewing schedule
Authored by: mkinney on Sep 12, '02 11:40:04PM

Figured it out. Thanks for the quick response though. I guess I should think things through a little more next time.



[ Reply to This | # ]
Use DigestAuthentication
Authored by: professor on Sep 12, '02 11:29:09PM

>In the Shared Library section, where modules are loaded, add these two lines in
>the same ordering in their repective sections:
>
>LoadModule dav_module libexec/httpd/libdav.so
>AddModule mod_dav.c

I\'m using Apache 2.0.40, so the mod_dav module is automatically built
and installed. If you configure with \"--enable-mods-shared=all\" it\'s automatically loaded from httpd.conf. In 1.3.x, mod_dav is considered
a \"3rd party\" module and not included in the standard distribution.


>Then somewhere in the global section add:
>
>DAVLockDB /Library/WebServer/davlocks/DAVLockDB

You mention mention this later, but it's important that this directory must owned by the www user:

chown www.www /Library/WebServer/davlocks/
chmod 755 /Library/WebServer/davlocks/

>I used this section to have a webdav folder managed by Apache:
>
><Directory \"/Library/WebServer/Documents/dav\">
> DAV On
> AuthName \'WebDAV\'
> AuthType Basic
> AuthUserFile /etc/httpd/.htpasswd
> AuthGroupFile /dev/null
> <LimitExcept GET HEAD OPTIONS>
> require valid-user
> </LimitExcept>
></Directory>

Basic Authentication? Yuck! That sends your password in cleartext.
Let\'s use Digest Authentication instead:

<Directory /Library/WebServer/Documents/dav/billy>
DAV On
AuthType Digest
AuthDigestFile /usr/local/apache2/var/davusers
AuthDigestGroupFile /usr/local/apache2/var/davgroups
AuthDigestDomain /dav/
AuthName \"dav\"
AllowOverride None
Options FollowSymLinks Indexes
<LimitExcept GET HEAD OPTIONS>
require user billy
</LimitExcept>
require group family
</Directory>
</blockquote>

Several things are going on here.

1)to create the password file (\"davusers\"), we need to use the \"htdigest\" command instead of \"htpasswd\".

2) the groups file (\"davgroups\") contains lines of the form

family: billy jane sarah
friends: tom dick harry

where the users (billy, ... ,harry) all have entries in the password file.

In the above example, members of the \"family\" group can read (but not write to) the files in this directory. While the others can subscribe to his calendars,
only \"billy\" (who has write-permission) can publish changes.

Obviously, there are a greate many variations . . .

>Then set up the folder with permissions.
>
> % cd /Library/WebServer/
> % mkdir davlocks
> % chown www:www davlocks
> % cd Documents
> % mkdir dav
> % chown www:www dav
>
>In iCal, choose Publish Calendar and specify http://localhost/dav/iCal.

Presumably, that\'s a typo unless you also created the subdirectory \"iCal\" and made it owned by the www user.



[ Reply to This | # ]
Use DigestAuthentication
Authored by: froz on Sep 13, '02 03:55:35AM

This will only work if you have Apache2 installed. Unfortunately, digest authentication is still not well supported, so you may not get this to work. It does work with Opera, Mozilla and cadaver. The AuthDigestGroupFile and AuthDigestDomain directives aren't needed for simple installations and, in fact this forum seems to have eaten some required text in the AuthDigestDomain. Create your davusers file like this (if you are following the above instructions):

htdigest davusers "dav" username



[ Reply to This | # ]
Use DigestAuthentication
Authored by: froz on Sep 13, '02 03:58:08AM

Uhm, I left out an arg:

htdigest -c davusers "dav" username



[ Reply to This | # ]
Use DigestAuthentication
Authored by: professor on Sep 13, '02 10:20:44AM

Uhm, I left out an arg:


htdigest -c davusers "dav" username


Use the "-c" (for "create the password file") argument for the first user you add.

Omit it for subsequent users, or you will wipe out the previously-created password file.


My hhtpd.conf entry got munged, so let me repeat it:

\<Directory /Library/WebServer/Documents/dav/billy\>
DAV On
AuthType Digest
AuthDigestFile /usr/local/apache2/var/davusers
AuthDigestGroupFile /usr/local/apache2/var/davgroups
AuthDigestDomain /dav/
AuthName "dav"
AllowOverride None
Options FollowSymLinks Indexes
\<LimitExcept GET HEAD OPTIONS\>
require user billy
\</LimitExcept\>
require group family
\</Directory\>


As was mentioned,

  • The "groups" file is only necessary if you want to restrict access by group of users.
  • With Apache 1.3.x, you need to get the revised mod_auth_digest module. This comes automatically with Apache 2.0.x.
  • iCal and most current wweb browsers (Mozilla, IE, Opera,...) support Digest Authentication. Some older browsers and the webDAV client, Goliath 0.9.1, do not.


[ Reply to This | # ]
Use DigestAuthentication
Authored by: mithras on Sep 13, '02 06:11:25AM
iCal uses an updated Digest spec, which is incompatible with the mod_digest module that comes with Apache 1.3.26 (in 10.2). Instead, you need to use mod_auth_digest. I compiled it for use with 10.2; you can download it from me. Untar the module, put it somewhere handy (/usr/libexec/httpd, or /Library/Application Support) then add the appropriate lines to httpd.conf: LoadModule digest_auth_module /path/to/mod_auth_digest.so and AddModule mod_auth_digest.c Then you can be on your way with secure Digest authentication!

[ Reply to This | # ]
Use DigestAuthentication
Authored by: rumorcontrol on Sep 16, '02 04:05:24PM

here's what I get..

Syntax error on line 47 of /etc/httpd/httpd.conf:
Invalid command 'DAVLockDB', perhaps mis-spelled or defined by a module not included in the server configuration
/usr/sbin/apachectl start: httpd could not be started

47 DAVLockDB /Library/WebServer/davlocks/DAVLockDB$



[ Reply to This | # ]
Use DigestAuthentication
Authored by: professor on Sep 17, '02 10:28:28AM

Is mod_dav really being loaded?
I.e., did you do the AddModule/LoadModule stuff?

N.B. mod_dav is NOT part of the standard Apache 1.3.x distribution. Apple
distributes it, but if you build Apache yourself (eg, using Fink), then you
need to build/install mod_dav too.

With Apache 2.0.x, mod_dav is part of the standard distribution. If you build
it with the standard

./configure --enable-mods-shared=all

mod_dav will be built and installed along with everything else. The standard
httpd.conf file (with this option), IIRC, includes the necessary

LoadModule dav_module modules/mod_dav.so

line (Apache 2.0.x doesn't have a separate AddModule directive).



[ Reply to This | # ]
apache wont start
Authored by: John Kiniston on Sep 13, '02 02:26:32AM

I un-commented the two dav related lines in my httpd.conf and now my apache wont start.

dyld: /usr/sbin/httpd Undefined symbols:
_XML_ErrorString
_XML_GetErrorCode
_XML_Parse
_XML_ParserCreate
_XML_ParserFree
_XML_SetCharacterDataHandler
_XML_SetElementHandler
_XML_SetUserData
/usr/sbin/apachectl: line 171: 435 Trace/BPT trap $HTTPD -t

any suggestions?

Darwin iguana 6.0 Darwin Kernel Version 6.0: Sat Jul 27 13:18:52 PDT 2002; root:xnu/xnu-344.obj~1/RELEASE_PPC Power Macintosh powerpc



[ Reply to This | # ]
apache wont start
Authored by: froz on Sep 13, '02 03:43:24AM

Looks like you have a broken mod_dav. It should have been statically linked with expat, or there should be a dynamic libexpat in /usr/libexec/httpd - I can't tell for sure because I have a pre-release of 10.2.1 and Apple has been moving libs around.

The info here: http://www.stepwise.com/Articles/Workbench/2002-04-05.02.html may be of help in getting it to work if you have the Developer Tools installed.



[ Reply to This | # ]
apache wont start
Authored by: JerkyJerk on Sep 13, '02 10:40:38AM
I have a question are you using the PHP module from Marc Liyanage's site? on my powerbook that's the one I'm using but my iMac is a stock install. I don't get that error on the iMac or I don't get the error if I disable the PHP module on my PowerBook. I compiled my own mod_dav and that didn't help. My next step is I'm gonna compile my own PHP module.
jerky

[ Reply to This | # ]
apache wont start
Authored by: jgmanning on Sep 13, '02 11:37:46AM

the PHP module from Marc Liyanage's site

Marc has confirmed that there's a conflict. Presumably the php module supplied by Apple will work with mod_dav.

I have found what appears to be a conflict between your PHP4 module and the WebDAV server included in 10.2. When both mod_dav your module are enabled, httpd restart fails with a bunch of XML errors.

I know, the two conflict... Not much I can do about it right now... You have to choose one or the other... There's a similar conflict with the apple_auth module.


[ Reply to This | # ]
apache
Authored by: JerkyJerk on Sep 16, '02 05:44:55PM
I can say for sure the Apple mod_php works with DAV.
jerky

[ Reply to This | # ]
apache
Authored by: srelan on Sep 17, '02 02:08:46PM

where can you get the apple mod_php (if you've already replaced it with mark Linage's module)



[ Reply to This | # ]
apache
Authored by: Goeres on Sep 22, '02 01:35:30PM
if you check Marc Liyanage page he suggests to load his PHP module only AFTER you load the DAV module (same for addmodule). At least his work for me and I am able to start apache again. I still have not been able to upload my calendar from ical but I have still the night a head.
regards
Robert

[ Reply to This | # ]
apache wont start
Authored by: westin on Sep 24, '02 03:49:30PM

Make sure you use Marc's Jaguar compile of PHP. Also make sure DAV is enabled and loaded after PHP



[ Reply to This | # ]
apache wont start
Authored by: chrispar on Oct 02, '02 06:46:37AM

This worked for me. I'm using Marc's PHP4 module and apache wouldn't restart until I changed the order of LoadModule and AddModule to force PHP to load FIRST.



[ Reply to This | # ]
Yes!
Authored by: livi on Sep 13, '02 06:00:05AM

OK... we got it up and running and can now publish to our own Webdav server... but how about viewing the cal on the internet via IE5 just like on .mac?
Any tips ?



[ Reply to This | # ]
Yes!
Authored by: MikeMc on Sep 30, '02 04:31:48PM

theres a php script out there (check hotscripts.com) that parses the ical file for you...



[ Reply to This | # ]
Get PHP iCalendar
Authored by: BiTurbo27t on Feb 18, '03 01:21:19AM

http://phpicalendar.sourceforge.net/nuke/



[ Reply to This | # ]
x server
Authored by: bergvall on Sep 13, '02 07:51:52AM

call me stupid, but how do you make it work on a mac running 10.2 server?



[ Reply to This | # ]
Mount WebDav like an iDisk?
Authored by: Alex281 on Sep 13, '02 07:59:40AM

Is this possible? I would love to be able to access my computer easily from a PC over the 'net!



[ Reply to This | # ]
Mount WebDav like an iDisk?
Authored by: laotzu on Sep 13, '02 09:02:09AM

Easily done, just Go > Connect to Server... in Finder, and type in the web address of the WebDAV server/directory. Like http://localhost/dav/, or any remote host.

It is much goodness. The drive can remain mounted even when you disconnect from the network, since it only sends data over the connection when you try to use it. Useful for a PBG4 owner like myself. :)



[ Reply to This | # ]
Mount WebDav like an iDisk?
Authored by: jermq on Sep 13, '02 01:45:21PM

iCal is subscribing OK, so it must be partially set up, but now I cannot access it via the Finder.

Entering http://iborg.local/dav/ results in the Finder error: "-36" and the Console says: "/sbin/mount_webdav: checking server URL: Operation not supported by device".

Any ideas?



[ Reply to This | # ]
Authorization problem?
Authored by: ricklin on Sep 13, '02 10:25:41AM

My own WebDAV server runs without any problems as long as I quote out the whole authorization section:

<Directory "/Library/WebServer/Documents/dav">
DAV On
# AuthName 'WebDAV'
# AuthType Basic
# AuthUserFile /etc/httpd/.htpasswd
# AuthGroupFile /dev/null
# <LimitExcept GET HEAD OPTIONS>
# require valid-user
# </LimitExcept>
#</Directory>

Otherwise, Personal Web Sharing won't start up and my Console log shows an error:

Syntax error on line 410 of /etc/httpd/httpd.conf:
AllowOverride not allowed here
/usr/sbin/apachectl start: httpd could not be started

Anybody has an idea what this could be? Thanks a lot for any help!



[ Reply to This | # ]
Authorization problem?
Authored by: westin on Sep 24, '02 03:52:15PM

I think the problem is the closing </Directory> tag you put in there. If your file works like that, then uncommenting the </Directory> tag would close the Directory directive prematurely, before the AllowOverride directive I presume comes next.



[ Reply to This | # ]
Authorization problem?
Authored by: robleach on Feb 17, '03 03:26:09PM
I had some trouble because I didn't follow the procedure to a "T". I attempted to use the authorization stuff I'm familiar with and already use at work on sun machines. instead of doing this line:
htpasswd -m -c /etc/httpd/.htpasswd user
I didn't use the -m and I used my existing .htpasswd file in my home directory. (And yes, I changed the specifiied location in the Directory tag.)

When I restarted apache, everything appeared fine, but I couldn't publish. I later discovered that apache wasn't running. here's what the error log had to say:
Processing config directory: /private/etc/httpd/users
 Processing config file: /private/etc/httpd/users/amy.conf
 Processing config file: /private/etc/httpd/users/marti.conf
 Processing config file: /private/etc/httpd/users/rob.conf
 Processing config file: /private/etc/httpd/users/yet.conf
[Mon Feb 17 11:54:11 2003] [warn] pid file /private/var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Feb 17 11:54:11 2003] [notice] Apache/1.3.27 (Darwin) DAV/1.0.3 configured -- resuming normal operations
[Mon Feb 17 11:54:11 2003] [notice] Accept mutex: flock (Default: flock)
[Mon Feb 17 11:54:11 2003] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon Feb 17 11:54:12 2003] [alert] Child 731 returned a Fatal error... 
Apache is exiting!
For those of you that don't have the location of this log memorized (like me), it's /etc/var/log/httpd/error_log.

So I went back and changed the .htpasswd file location back to what was suggested and used to suggested command and everything worked fine. So I'm wondering what the -m flag does and I'm wondering if it could be related to another problem I'm having with that other .htpasswd file I have. I'd put a .htaccess file in a directory I wanted to protect, indicating the appropriate file, but no authentication happens. Here's my access file:
AuthType Basic
AuthName "My Access"
AuthUserFile ~rob/.htpasswd

require valid-user
order allow,deny
allow from all
deny from none
If I simply use the -m flag, will it fix this access problem too?

Rob

[ Reply to This | # ]
Maybe a solution for some?
Authored by: m7n on Sep 13, '02 01:12:44PM

Sweet thread. Thanks to the original poster. I've been wanting to acheive iDisk-like functonality for a while as there's only 17 days left on my .Mac account.

So I followed original instructions, made the DAVLockDB relocation change suggested by ehowe, and still ran into the same problems as ricklin with the authorization stuff in the <Directory>area preventing apache from restarting. (same errors as described by ricklin)... I could get DAV to work by commenting out the authorization lines, but of course wanted to have some security on the folder.

Anyway, I found a possible solution at the WebDAV.org site that worked for me. (http://www.webdav.org/mod_dav/install.html#apache). It basically involves not including anything at all in the <Directory> tags, and moving them to a new <Location> set... here's what I included in my httpd.conf file:

<Location /dav>
Dav On
AuthName 'WebDAV'
AuthType Basic
AuthUserFile /etc/httpd/.htpasswd
<LimitExcept GET HEAD OPTIONS>
require valid-user
</LimitExcept>
</Location>

(this section was added right after the #<Location /cgi-bin/phf*> ... </Location> section that was already written in my httpd.conf file.)

After making this modification, apache would restart, and I could publish/subscribe to and from the dav folder, mount it on my desktop at work, when using a user and pass that I'd set up.

Apparently this authentication method is still insecure, so I'm trying to learn how to use a better method (like the one described by professor.) For now, at least I'm making a little progress and learning a lot.

I do have virtual hosts set up on my server, which could have been the cause for the original problems. Also, I'm running 10.2.

m7n



[ Reply to This | # ]
iCal to website publishing ? We need an XML parser
Authored by: livi on Sep 13, '02 01:50:27PM

I have now my own Webdav server, but i'm still unable to create a webpage of my Calendars. We need some kind of XML parser so that we can create .mac-like webbased calendars...

Who is willing to create such an XML parser for Apache?



[ Reply to This | # ]
iCal to website publishing ? We need an XML parser
Authored by: professor on Sep 13, '02 05:47:21PM

http://www.mozilla.org/projects/calendar/

Precompiled versions currently available
for Linux and Windoze.

Coming soon for MacOS. (Course, if you are
running Jagwyre, you can just use iCal).

But perhaps you are asking about a server-side
(rather than client-side) solution?



[ Reply to This | # ]
iCal to website publishing ? We need an XML parser
Authored by: theMaker on Sep 13, '02 06:23:26PM

It's not really XML... I am currently planning development of a php and perl parser for the .ics file format produced. I have found this document detailing the ics format: http://www.faqs.org/rfcs/rfc2445.html.

It seems to correspond identically to the format Apple has used. Which is also supported by clients on other platforms... Linuxnix, Windows.

It will simply be a matter of mapping out the tags used and producing corresponding html for viewing. This is presumably what Apple has done for you if you have an account.

Before I do this, I want to know if a parser already exists... I think I found one that will convert ics to rdf and rdf to ics. This would be handy for any clients not supporting the ics format.

If anyone knows of other parsers for this format, please email me: conrad at schilbemedia dot com. (replace characters accordingly).

If anyone is interested in assisting, likewise, email me.



[ Reply to This | # ]
iCal to website publishing ? We need an XML parser
Authored by: livi on Sep 14, '02 04:52:43AM

This is what we need ! I'm sure there are guys out there that have enough experience to do this....

If Apple can make it, we can do the same... A PHP solution is the best thing. Universal and free !



[ Reply to This | # ]
iCal to website publishing ? We need an XML parser
Authored by: theMaker on Sep 14, '02 06:33:28PM
I have done further research into this and am now looking for some assistance. I have alot of experience in developing web based applications but it would be nice to have others to spread out the work. I found more documentation on the format used and specifications on how to implement and distribute it. I have created PDF's that can be d/l here: CAP.pdf DTD.pdf GUIDE.pdf iCAL.pdf iMIP.pdf iTIP.pdf All of this information is very specific and technical. I have not yet gone through all of the documentation but have decided on a 3 phase plan. Where phase 1 is to develop a parser that will display the data in a web browser. The 2nd phase is to develop interface to edit the data online. And finally phase 3 is to have user based access control and sharing for individual calendars. Again, anyone interested in helping, please email me: conrad@schilbemedia.com. I will likely be setting up a sourceforge account for development of this project and will post back here when I have done so.

[ Reply to This | # ]
Try PHPiCalendar
Authored by: rluttman on Feb 23, '04 08:26:47PM

I have had success using PHPiCalendar (http://phpicalendar.sourceforge.net/nuke/) on my local WebDav server. The biggest problem - at least with the version I use - is that you can't edit the calendar through the web page.



[ Reply to This | # ]
Authorization bumps me to .local
Authored by: specbebop on Sep 14, '02 12:54:50PM

This has been happening since I installed 10.2 and until now I've just ignored because I don't use it too much. But, now I need it for something useful.

Whenever I use the htpasswd method of authentication, when I first try to connect to the protected page it will ask for the username and password for my domain, as it should. then it asks for it again with my rendevousname.local address as the domain. Locally, that's ok but, remotely, obviously it won't work.

Can anyone explain why I'm getting bumped to .local and how to fix it?

Thanks. I know this is sort of OT for this thread but, it came up in my WebDav config.



[ Reply to This | # ]
Another setup how-to...
Authored by: jgmanning on Sep 15, '02 08:55:59AM
Thanks to the efforts of many posters on several sites, I mananged to put together fairly detailed instructions for enabling WebDAV on the stock Jaguar installation. Publish your calendar on your local network.

[ Reply to This | # ]
Another setup how-to...
Authored by: stijnbokhove on Sep 20, '02 09:14:29AM

Hmm unfortunately, I have Marc Liyanage's PHP module installed... How can I reinstall the one that came with Jaguar?

Thanks for your help!



[ Reply to This | # ]
Ical to website PHP code available now
Authored by: livi on Sep 18, '02 09:26:05AM

I just noticed, downloaded and tested successfully some PHP code that shows your Ical online in a browser...

Check it out on: http://www.macupdate.com/dev.php?id=9224



[ Reply to This | # ]
Ical to website PHP code available now
Authored by: westin on Sep 24, '02 04:02:51PM
The more appropriate link now is http://sourceforge.net/projects/phpicalendar/ PHPiCalendar doesn't come with any documentation, so if you're having trouble with it you can check out my tutorial on setting it up, here. Hope that helps, Greg

[ Reply to This | # ]
Ical to website PHP code available now
Authored by: robleach on Feb 17, '03 04:54:47PM

Your iCalendar tutorial site worked great for me. I was wondering if you know if it allows you to add calendar events remotely? I'd like to be able to add an event from home and work both. Maybe that's just not possible... Perhaps if there was a command line interface to iCal, I could ssh in and do it...

Thanks,
Rob



[ Reply to This | # ]
If you have GoLive 6...
Authored by: Elander on Sep 18, '02 03:23:36PM

...you also have a copy of "Adobe Web Workgroup Server" (it's on the other cd). This is a WebDAV server that is extremely easy to install and set up. It might take as long as ten minutes, but only if you include the coffee break... ;-)

Adobes server is a lot easier to manage, it is all done through a web interface that is about as friendly as most other Adobe applications. This might be less intimidating than mucking about with httpd.conf (although that gives you a lot more options and better control if you really know what you're doing).

No, I am not affiliated with Adobe in any way, I don't get payed for endorsing their products and I don't own Adobe stock. I just like their applications...honest!



[ Reply to This | # ]
Got WebDAV working, but not iCal
Authored by: foodragon on Sep 22, '02 04:18:20PM

Here's the problem I'm running into. When I try and publish to my local server I get an error stating that it couldn't be published. If I remove the http:// from the addres it looks like it publishes but when I check the DAVdoc folder there are no ics files, and upon checking even through the web via a broswer I get asked for the login and password, but there a no files in the folder. I'm assuming that WebDAV is working because I'm being asked for the login and password, but I could be wrong in my thinking. Any ideas?



[ Reply to This | # ]
Got WebDAV working, but not iCal
Authored by: westin on Sep 24, '02 03:57:27PM

That you are being asked for a password means that the directory is password protected, but not that WebDAV is working.

Make sure you're using this syntax to publish:

http://server.name.or.ip/dav

Don't specify a calendar name in that line or anything.

Other than that, I'm not sure what to say. You can check to see if WebDAV is working by trying to open it using something like Goliath (? I think that's the name? The WebDAV app?)

Greg



[ Reply to This | # ]
Got WebDAV working, but not iCal
Authored by: MikeMc on Sep 30, '02 04:43:29PM

if your using OS X, connect using Finder -> GO -> connect to server...

make sure you can create folders, and rename them... this is important.. you could get some functionality and *think* webdav is working, but it may not be setup correctly... that would cause little problems like this.



[ Reply to This | # ]
Got WebDAV working, but not iCal
Authored by: RickoKid on Nov 10, '03 06:42:21PM

I mounted the WebDAV share in the Finder .. and I can't add folders or files - what have I done wrong - how can I fix it?

---


RickoKid



[ Reply to This | # ]
Got WebDAV working, but not iCal
Authored by: twopeak on Feb 08, '05 08:16:01AM

I have the same problem here.
I ended up trying to make all dirs read and writable for everyone; but it still doesn't help:

"This access has been forbidden by server."

It would be nice if someone could say why this happens and how to prevent it!
Thanks



[ Reply to This | # ]
403: Forbidden Access Issue
Authored by: tranzparency on Jan 27, '03 06:37:49PM

I've tried everything I can think of and I still get the 403 Forbidden message. It will not let me enter a username or password. Here's what I did.

Created appropiate folders:
---------------------------
%cd /Library/WebServer/Documents
%mkdir DAVdocs
%chown www:www DAVdocs
%cd /Library/WebServer/
%mkdir DAVLock
%chown www:www DAVLock


Edited my httpd.conf file:
----------------------------------------
LoadModule dav_module libexec/httpd/libdav.so ** UNCOMMENTED THIS **
AddModule mod_dav.c ** UNCOMMENTED THIS **

<Directory "/Library/WebServer/Documents/DAVdocs/">
DAV On

AllowOverride AuthConfig
AuthName "DAV Restricted"
AuthType Basic
AuthUserFile /Library/WebServer/users

Require valid-user
</Directory>

Created user for directory:
-------------------------
%cd /Library/WebServer
%htpasswd -c users davuser


I created a .htaccess file in the /Library/WebServer/Documents/DAVdocs folder:
-----------------------------------------------------------------------------
AuthName "DAV Restricted"
AuthType Basic
AuthUserFile /Library/WebServer/users

require valid-user


Then made sure all file directory permission were correct:
----------------------------------------------------------
%chown www:www /Library/WebServer/Documents/DAVdocs/.htaccess


I restarted Apache then tried to access the folder from a browser. I get a "403 Forbidden Access" response. It doesn't even give me the chance to enter a username or password. I ran litmus againt the server and it failed authentication. I'm at wits end here.. Any ideas?



[ Reply to This | # ]
403: Forbidden Access Issue
Authored by: wrongpart on Jun 05, '03 08:38:33AM

You have to change "require valid-user" to "require davuser" in the .htaccess and httpd.conf files



[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: wrongpart on Jun 05, '03 08:35:42AM
Using these instructions to setup the webdav service and PHP iCalendar to parse the ICS files to html, I was able to setup quite easily a web calendar server on MacOSX (and Linux). PHP iCalendar installation is really easy, juste beware of the file permissions.

[ Reply to This | # ]
Lock database? What Lock database?
Authored by: elmlish on Jul 28, '03 03:40:13PM


Hello, i followed the steps from the parent post, put together this directory in httpd.conf..

<Directory "/Users/elmlish/Sites/dav"\>
DAV On
AuthName "dav"
AuthType Basic
AuthUserFile /Users/elmlish/Sites/dav/.htpasswd
<LimitExcept GET HEAD OPTIONS PROPFIND>
require valid-user
</LimitExcept>
</Directory>

and end up getting this Error when I browse to http://localhost/~elmlish/dav

Error: A lock database was not specified with the DAVLockDB directive. One must be specified to use the locking functionality. [500, #401]

Where do I specify a DAVLockDB database? In the directory, or closer to the LoadModule stuff?

btw.. I'm using Complete Apache 2.47 with Complete PHP 4 on Mac os X 10.26.



[ Reply to This | # ]
Lock database? What Lock database?
Authored by: elmlish on Jul 28, '03 04:17:32PM

I've mucked around using the the step through here:
http://www.webweaving.org/ical/
and I've got something closer to working.


These were the steps I missed in getting a Lock Database:
"""
create the empty lock databases and make sure that they are owned and writable by the web server:

touch /var/db/DAVLock.dir
touch /var/db/DAVLock.pag
chown www /var/db/DAVLock.*
chgrp www /var/db/DAVLock.*
chmod 640 /var/db/DAVLock.*
"""

Now I just can't seem to get authenticated.
This is the error that I get:
Digest: user `elmlish' in realm `iCal' not found: /~elmlish/dav/ical

Now I've got a password file here:
AuthDigestFile "/Library/Apache2/etc/dav.digest.passwd"

but from the looks of the error message, it doesn't seem to be looking there. Anyone have any ideas on what I should be doing now?



[ Reply to This | # ]
Lock database? What Lock database?
Authored by: meximilian on Jan 12, '04 11:41:15AM

hi, im using the standart apache server of 10.3.
is the dav module included in this version ... can anyone give me a working http.conf? i think im too stupid to edit this file the right way ... thx in advance ... mexx

---
greetingz mexx



[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: Robert on Feb 23, '04 01:19:02PM

The URL should be http://localhost/dav rather than http://localhost/dav/iCal.



[ Reply to This | # ]
Publish other iLife apps?
Authored by: rluttman on Feb 23, '04 08:47:51PM

Presumably, the other iLife apps that integrate with .mac are amenable to the same technique(?) Has anyone tried, say publishing iPhoto pix, to a local WebDAV server and accessing them across the Internet and / or via a browser?



[ Reply to This | # ]
Problem to Publish iCal calendars with local WebDAV server
Authored by: hajilo on Aug 21, '04 11:45:38PM

Dear Sir;
First of all let me say thanks for your helpful guiding to set WebDAV.
Anyway I tried to do all commend as your guide, finally I have done all, unfortunately when I wanted to test it in safari it was giving the following error message:
""calendar could not published Tis access has been forbidden by server""
meanwhile if I put my calendar on DAVdocs folder people are able to subscribed and see it
please can you explain what to do next, looking forward to your earliest reply.
best regards



[ Reply to This | # ]
Edit iCal calendars with local WebDAV from two locations?
Authored by: janpeeters on Feb 08, '05 01:15:09PM

Well I've had the WebDAV way working for some time on my server. But what really breaks my head is if we could find a way how to be able to update the same calendar from two different locations. E.g. from my powerbook and desktop machine. I've heard that there are attempts to get this working like on .Mac but haven't ran across any tutorial.

Does anyone know of such a trick?

Jan



[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: rockit99 on Aug 18, '05 04:18:53AM

Has any one managed to make this work reliably in Tiger? I've been trying for ages to adapt the code and still cannot get anything to publish... Any help would be really welcome.



[ Reply to This | # ]
Failed wih Tiger
Authored by: mizraith on Jun 29, '06 02:20:21PM

Back in January (2006) I tried for a few weeks on end to get this to work with the Apache 1.5 install on OS 10.4. I also tried getting SSL to work with WebDAV as well. In the end, I was forced to comment out every change and revert back to where I was...a simple Apache instance. I just couldn't get WebDAV to work reliably or (typical) get WindozeXP to play nice.

If someone out there has updated instructions for OS 10.4 that are more straightforward, then pleeeeze post them. WebDAV should be functional/cross-platform and a breeze.



[ Reply to This | # ]
Working Example on Ubuntu
Authored by: lullabud on Jan 04, '07 03:54:40PM

Since I figure I'm not the only person using Ubuntu and OS X 10.4.8 together, I figure I'll post my working config which is running on Ubuntu 6.06.1 and is accessible from OS X and Windows XP.

######

in the apache config:

<IfModule mod_dav.c>
DAVLockDB /var/lock/mod_dav/Dav_Lock
Alias /ical /var/dav/davroot
DavMinTimeout 600
<Directory /var/dav/davroot>
Dav On
Options +Indexes
AllowOverride None

AuthType Digest
AuthDigestFile /etc/apache2/davusers
AuthDigestGroupFile /etc/apache2/davgroups
# Finder.app v 10.4.6 won't mount shares with the following directive enabled...
# AuthDigestDomain "ubuntu-server"
AuthName "ubuntu-server"

Require valid-user
Order deny,allow
Deny from all
Allow from 10.1.0 192.168.0
Satisfy Any
</Directory>
</IfModule>

######

at a shell prompt:

sudo mkdir -p /var/lock/mod_dav
sudo touch /var/lock/mod_dav/Dav_Lock
sudo chown www-data:www-data /var/dav/davroot /var/lock/mod_dav/Dav_Lock
sudo htdigest -c /etc/apache2/davusers ubuntu-server someusername

#######

....and i think that's all....



[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: bhattach on Jun 10, '07 05:49:23PM

I followed the steps. However, when I try to pulish from iCal, get an error message http://bhattach@localhost/dav/iCal/Debashis%20Calendar.ics is not a valid location for this request


I have checked that the various directories exist, and have given wide open (777) permission, for now, just to avoid any issue with directory permissions. Still, this does not work.



[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: saskmacguy on Dec 03, '07 12:40:17PM

Make sure you change the write privs of the directory you have set for your publish location. It has to be "world writeable"... So in the terminal, change directories to just _above_ that directory... so for example, if my calendars directory is located at the root of my main web directory, and called "ical"

cd /library/webserver/documents

gets me to my root webserver files directory

the following command changes that directory to world writeable:

chmod o+w ical

This directory SHOULD be password protected, as the rest of this hint talks about... Otherwise anybody could come in here and publish calendars.

But now my iCal can write to this password protected directory.



[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: kohlman on Jul 24, '08 03:13:23AM

this hint is still useful and shows how create a local webdav-server
for other purposes webpublishing via webdav etc.



[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: Imtiaz on Sep 30, '09 05:03:37AM
While these new features and security improvements have garnered positive reviews seo, Vista has also been the target of much criticism and negative press. Criticism of Windows Vista has targeted its high system requirements, its more restrictive licensing terms, the inclusion of a number of new digital rights management technologies aimed at restricting the copying of protected digital media, lack of compatibility with some pre-Vista hardware and software, and the number of authorization prompts for User Account Control. As a result of these and other issues, Windows Vista had seen initial adoption and satisfaction rates lower than Windows XP virtual private server.However, with an estimated 330 million internet users as of January 2009, it has been announced that Vista usage had surpassed Microsoft's pre-launch two-year-out expectations of achieving 200 million users.As of the end of August 2009, Windows Vista (with approximately 380 million internet users) is the second most widely used operating system on the internet with an approx. 23% market share, the most widely used being Windows XP with an approx. 69% market share.

[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: jhon.lincon on Mar 24, '10 05:07:33AM
What I like to do is set up a separate Gmail account that "owns" the calendar for a project. Then I share the project's calendar with myself and other Google users, so we can then all make changes from within our own accounts. The people who don't have a Google account can log in using the project's account to make changes. This is especially useful when working with people in other timezones, because Google makes sure everyone sees all the events in their local timezone. mcse

[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: domain on Dec 08, '10 11:46:32AM
After following these instructions I "apachectl graceful" to restart my server. It wouldn't restart. So I ran "apachectl configtest" which gave me the following: Syntax error on line 190 of /etc/httpd/httpd.conf: Invalid command 'DAVLockDB', perhaps mis-spelled or defined by a module not included in the server configuration of Domain hosting.

[ Reply to This | # ]
Publish iCal calendars with local WebDAV server
Authored by: KrAM on Jan 12, '11 08:25:22AM

Good afternoon,

I followed the instructions presented in the first post and achieved 1 month ago to publish a calendar in our server.
Today, I tried to add another calendar and it doesn't accept the user/pass. When I fix the problem doing another time the /etc/apache2/.htpasswd, I find this message at the moment of publishing my calendar at http://localserver/dav/iCal/.

Calendar can not being Published.
An error ocurred in the answer http://user@localserver/dav/iCal/Calendar.ics
The answer of the server was:
"HTTP/1.1 500 Internal Server Error"

Apache has not syntax errors because I passed apacheclt configtest correctly.
I am using Snow Leopard Server with Apache2.

Can you help me please?



[ Reply to This | # ]