Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > iCal: how to setup WEBDAV to work on your own webserver

iCal: how to setup WEBDAV to work on your own webserver
Thread Tools
nycdunz
Senior User
Join Date: Aug 2002
Status: Offline
Reply With Quote
Sep 10, 2002, 09:45 AM
 
does anyone know how to properly setup and configure webdav module in apache so that i can publish iCal's calendar to my own webserver rather than usings mac.com's webserver? i am confused on how to do this, please some apache experts out there help plz... thanks

i even tried to add this into my httpd.conf:

DAVLockDB /Users/gordon/davhome/DAVLock

<IfModule mod_dav.c>
<Directory "/Users/gordon/Sites">
DAV on
<Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require user gordon
</Limit>
</Directory>
</IfModule>
     
seb2
Grizzled Veteran
Join Date: Feb 2001
Location: Germany
Status: Offline
Reply With Quote
Sep 10, 2002, 10:03 AM
 
i followed the instructions on a swiss site in french: http://www.seriot.ch/modules.php?op=...thread&order=0 -- i don't know whether a babelfish translation is useful, i do speak french.

but from what i saw, the babelfish translation should do it.

there's one thing, however, i did differently: they tell you to configure the entire webdav directory in your httpd.conf -- i think that's no good. so i only added

<Directory /Library/WebServer/Documents/webdav>
DAV On
AllowOverride AuthConfig
</Directory>


to my httpd.conf and instead configured the access stuff in the ".htaccess" which -- for me -- looks like this:

AuthUserFile /Library/WebServer/.htpwd
AuthType Basic
AuthName "WebDAV bei Seb"
require user seb


well, of course, i afterwards created a .htpwd (use whatever document name you want, just make sure it's the same as specified in the .htaccess) and added a user called "seb".

the advantage of having the access stuff in the .htaccess is that you don't have to restart apache after modifying it and that you're more flexible when it comes to subdirectories.

works beautifully here.

somewhat clear?
     
nycdunz  (op)
Senior User
Join Date: Aug 2002
Status: Offline
Reply With Quote
Sep 10, 2002, 10:25 AM
 
and this works with iCal when publishing to it?

also where do i stick the .htaccess file? and do i use my username instead of seb?

please help, hehe...

and for the .htpwd file what is contained in there?

and when you publish to a web server in ical, what url do you type? and do you have to specify a username and password or no?
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Sep 10, 2002, 10:55 AM
 
Web Access
First of all, realize that none of this will give you the nifty .Mac "Web Acccess" interface to your calendars. That system relies on a WebObjects program that reads and displays your iCalendar files on the web. I'm working on a PHP program to do this, but it's not yet done.

Easiest Way
First of all, if you want dead-simple publishing of a calendar, just copy a calendar from "~/Library/Calendars" and drop it in your Sites folder. Done.

[ and no, aliases or symlinks won't work, unless you configure the access control in Apache ]

Then access the calendar at http://localhost/~username/Personal.ics (or whatever).

If you just need to point a remote iCal to one of your calendars now and then, this works fine. But of course, this doesn't do automated updating or other nifty things, so on to WebDAV:

Personal Access
If you want unfettered access to all of your Calendars from any other computer running iCal, then do this:

1. Enable Digest authentication. At Terminal, type:
apxs -e -n digest -a mod_digest.so

2. Edit /etc/httpd/httpd.conf and add the following section at the very end.
Make sure to put YOUR USERNAME in place of the word 'username'

Code:
# Begin Calendar Access Alias /Calendars "/Users/username/Library/Calendars" <Directory "/Users/username/Library/Calendars"> Options Indexes AuthName "Calendars" AuthType Digest AuthDigestFile /Library/WebServer/digest_users Require valid-user </Directory> # End Calendar Access
3. Create a username and password.
This should be DIFFERENT than your normal login username and password. You might want to allow others to read this calendar too.
At the Terminal, type:
htdigest -c /Library/WebServer/digest_users "Calendars" newusername
and enter a password.

4. Restart Web Sharing.

WebDAV

I'll add this section in a minute. I want to post what i have.
     
nycdunz  (op)
Senior User
Join Date: Aug 2002
Status: Offline
Reply With Quote
Sep 10, 2002, 11:17 AM
 
ok i hope this works, i hope the 2nd method will allow me to use my own webserver just like the .mac one...

so ppl can view my ical and i can set it to do automating updating to my own personal web server....

     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Sep 10, 2002, 11:22 AM
 
Originally posted by Mithras:
I'm working on a PHP program to do this, but it's not yet done.
If you want a partner on that quest, I was thinking of working on it myself. I would be willing to team up if you are. People would absolutely love it.

Also, I tried the simple Mac OS X Server way of turning on WebDav but I don't know if it's working or not. I've never done WebDav and I'm not sure I know how to test it. iCal does nothing, no matter which server I choose, even if I make it non-sensical. I can only publish to my iDisk. I wish iCal gave me some feedback so I know if it's my server or iCal as the problem.
     
seb2
Grizzled Veteran
Join Date: Feb 2001
Location: Germany
Status: Offline
Reply With Quote
Sep 10, 2002, 11:32 AM
 
Originally posted by nycdunz:
and this works with iCal when publishing to it?
as mithras pointed out, you don't get that nice web acces, but you can publish to and subscribe from a calendar published this way.
also where do i stick the .htaccess file? and do i use my username instead of seb?
put the .htaccess in /Library/WebServer/Documents/webdav/ -- at least if you set that directory to be your webdav root.
use any username you want -- doesn't have to exist as "real" user on the machine. these users only exist to the web server.

fell free to call your user "seb"
and for the .htpwd file what is contained in there?
it's created by htpasswd. when you add users to the file containing the password, it adds the name of the users and an encrypted password.
use it
sudo htpasswd -c <fileName> <userName>
the "-c" tells it to create the file, so only use "-c" the *first* time you add a user. for all additional users, simpley ommit it.
create the file at the location specified in your .htaccess, in my case /Library/WebServer/.htpwd
and when you publish to a web server in ical, what url do you type? and do you have to specify a username and password or no?
the url is http://<nameOfYourMachine>/webdav -- at least if you followed the example on the swiss page.
if you don't create a .htaccess with users in it, no password is required. if you do, the password specified in your .htpwd (or whatever you called it) is required.

passwords are a good thing.
     
m.brown
Dedicated MacNNer
Join Date: Jan 2002
Status: Offline
Reply With Quote
Sep 10, 2002, 12:58 PM
 
Thanks for posting this - I followed the tutorial and it works great!

Originally posted by seb2:
i followed the instructions on a swiss site in french: http://www.seriot.ch/modules.php?op=...thread&order=0 -- i don't know whether a babelfish translation is useful, i do speak french.

but from what i saw, the babelfish translation should do it.

there's one thing, however, i did differently: they tell you to configure the entire webdav directory in your httpd.conf -- i think that's no good. so i only added

<Directory /Library/WebServer/Documents/webdav>
DAV On
AllowOverride AuthConfig
</Directory>


to my httpd.conf and instead configured the access stuff in the ".htaccess" which -- for me -- looks like this:

AuthUserFile /Library/WebServer/.htpwd
AuthType Basic
AuthName "WebDAV bei Seb"
require user seb


well, of course, i afterwards created a .htpwd (use whatever document name you want, just make sure it's the same as specified in the .htaccess) and added a user called "seb".

the advantage of having the access stuff in the .htaccess is that you don't have to restart apache after modifying it and that you're more flexible when it comes to subdirectories.

works beautifully here.

somewhat clear?
     
brainchild2b
Grizzled Veteran
Join Date: Sep 2000
Location: The Basement
Status: Offline
Reply With Quote
Sep 10, 2002, 03:24 PM
 
If you guys write the php, I'd be willing to handle GUI and the graphics. I'm damn good. contact me brainchild2b on AIM
     
iBeige
Junior Member
Join Date: Oct 1999
Status: Offline
Reply With Quote
Sep 10, 2002, 03:57 PM
 
There is already a great php calendar library built by these guys, i use an implimentation of it for my Fraternity's online calendar. it uses a mysql database, and it would be easy to write a php .ics -> mysql converter tool to import iCal data to the calendar. You just have to design your own 'week' and 'day' views, but i almost never use those.

it would also be easy to use the calendar display code from this project to interface with a php script to read .ics data, so that the GUI would realtime display the uploaded (via ftp, whatever) "published" .ics files.

http://open.appideas.com/Calendar/

Feel free to contact me for any assistance in this project, it would be easy to use this code, add in Apple's GUI from the .mac webapp, and add a php .ics 'reader' which I'm sure someone has code for.

Dan
[email protected]
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Sep 10, 2002, 07:54 PM
 
Thanks for the pointer iBeige. Looks promising.

I've got a little project going that will basically consist of Apache running as your own user, launched as a Login item. If you run it with SSL and require authentication to even talk to it it should be more-or-less secure... So basically, if you can write something in PHP that would be useful if it had access to your home folder, it could plug in to this.

For example, a little PHP script that can parse your StickiesDatabase to show you your latest stickies notes from anywhere. Or one to read the Addressbook. Or one to control iTunes. And so on.

So this Calendar thing would be perfect.

I'm rehashing the base to make it all very modular and pluggable, but hope to have something this week (though I've thought that for months now). In the meantime if any of you want to work up any of these ideas, that'd be awesome.

Ook. I've just realized that iCal chokes on Digest authentication when using mod_digest. Someone pointed out on the Apple servers that that iCal does succed with the 'experimental' (but more standards-compliant) mod_auth_digest.

So I'm working on adding mod_auth_digest to the mix right now.

cheers
mithras
     
Patton76
Junior Member
Join Date: Sep 2001
Location: Belgium
Status: Offline
Reply With Quote
Sep 10, 2002, 08:05 PM
 
I followed the instructions on the french website, but I can't seem to get the webav server working.

When I'm trying to connect with command K, I always get a -36 error.

Am i missing something here?

Any help would be appreciated.

Thanks
     
dtriska
Mac Elite
Join Date: Sep 2000
Location: Canada
Status: Offline
Reply With Quote
Sep 10, 2002, 08:47 PM
 
     
Nebagakid
Mac Elite
Join Date: Sep 2000
Location: 'round the corner
Status: Offline
Reply With Quote
Sep 10, 2002, 09:40 PM
 
Can someone make an AppleScript Studio Program to do this?

and, if apple relies on WebObjects to do the nice showing of it, how come people with out WebObjects can?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 10, 2002, 11:11 PM
 
Not to sound cocky and/or arrogant, but I've struggled with WebDAV for many hours and finally figured it out to the point where I might consider myself pretty knowledgeable and experienced on the subject.

I'm working on a very thorough and complete how-to for this which is nearly complete. I was thinking of submitting the final copy to Mac OS X Hints.

If you have any specific questions about the httpd.conf setup, feel free to ask me here and I'll try my best to help!
     
Gary Finley
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Canmore, AB, Canada
Status: Offline
Reply With Quote
Sep 11, 2002, 11:45 PM
 
[QUOTE]Originally posted by besson3c:
I'm working on a very thorough and complete how-to for this which is nearly complete. I was thinking of submitting the final copy to Mac OS X Hints.

Please let us know when this is ready for distribution. My Web guy spent some time with the Apache mod_dav on our Linux server recently. Although the result mostly works from Windows, it's badly broken from the OS X Finder. We'd like to know how to fix it for iCal swapping. If you're keeping a mailing list for interest in our How-To, please add [email protected]. Thanks.
Gary Finley
Director of Networking
Netera Alliance Inc.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:07 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,