HOWTO Setup WebDAV on Mac OS X
Setting up WebDAV on Leopard
The good news is that all the bits and pieces of software that you need to run a WebDAV server on Mac OS X 10.5 Leopard are already installed. You only need to configure them correctly and turn them on. Some experience with Terminal is preferred, and you should be familiar with executing UNIX commands. Let’s start!
- Start Apache. (If you haven’t already) You will need to enable Web Sharing, since the WebDAV service will be provided by Apache, the web server on Mac OS X. You do not necessarily need to have a web site running, but you will need to activate and run Apache. Go to System Preferences > Sharing, and turn on the box labeled
Web Sharing .
- Enable WebDAV support in Apache. Edit the file
/etc/apache2/httpd.conf, (remember to usesudoto edit it) and locate this line:LoadModule dav_module libexec/apache2/mod_dav.so
Make sure it is not commented (there should be no "#" at the beginning of the line.) Then locate this line (towards the bottom of the file):
Include /private/etc/apache2/extra/httpd-dav.conf
Again, make sure it is not commented out. It is disabled by default, so you need to remove the "#" from this line.
- Configure WebDAV. Next, edit the file
/etc/apache2/extra/httpd-dav.conf. Add a section in it to create our new WebDAV share. Here’s what the new section should look like. As a security precaution, you should also go ahead and delete the/usr/uploadsshare that is set by default.Alias /webdav "/Library/WebServer/WebDAV" <Directory "/Library/WebServer/WebDAV"> Dav On Order Allow,Deny Allow from all AuthType Basic AuthName WebDAV-Realm AuthUserFile "/usr/webdav.passwd" <LimitExcept GET OPTIONS> require user YourUserName </LimitExcept> </Directory>On line 1, the name following the Alias keyword is the URL you’d like for your new WebDAV share. If you want the share to be located at
http://your-server-name/your-fancy-webdav-share, then line 1 should read:Alias /your-fancy-webdav-share "/Library/WebServer/WebDAV"
On line 9, we specify the authentication scheme as
Basic, notDigest. The security conscious will note that this sends unencrypted passwords over plain text. In my tests, OmniFocus was not able to communicate with the server with the Digest authentication scheme. Remember not to use a particularly important password for this account.On line 14, substitute the username you would like to use for your WebDAV account. Note this down, because you will need this again in the next step.
- Create user accounts and passwords. Use the
htpasswdtool to create your password file.sudo htpasswd -c /usr/webdav.passwd "YourUserName" New password: Re-type new password: Adding password for user YourUserName
- Create the necessary directories.
sudo mkdir -p /Library/WebServer/WebDAV sudo mkdir -p /usr/var
- Setup permissions correctly.
sudo chown -R www:www /Library/WebServer/WebDAV sudo chown -R www:www /usr/var sudo chgrp www /usr/webdav.passwd
- Restart Apache gracefully.
sudo apachectl graceful
- Test your server. Optionally, you can test your WebDAV configuration using litmus, a WebDAV server test tool. It is distributed as source code with no binaries, so you will need to compile it first, for which you will need Apple’s Developer Tools. You can test your server manually by using a graphical client such as Goliath. Try uploading a file and see if you can access it again.
That’s it, you can now point OmniFocus to http://your-server-name/webdav and provide the credentials you created earlier. With this setup, you will immediately be able to access your WebDAV server over your local network. If your machine has a static public IP address, you will also be able to sync from outside your local network.
If, on the other hand, your machine is behind a router, you will need to configure port forwarding on your router. If you do not have a static IP, you will need to set a dynamic hostname via services like DynDNS.
Possible Error Messages
This is by no means a zero error configuration, and sometimes things might go wrong. Here are some of the common error messages and how to fix the relevant errors:
The locks could not be queried for verification against a possible "If:" header.
No such file or directory: Could not open property database
The web server is not able to access the password file. In our example, you need to ensure that/usr/webdav.passwdcan be read by the Apache user,www. To do that, run the following chmod command.sudo chgrp www /usr/webdav.passwd
Client used wrong authentication scheme: /webdav/
You probably set the Authentication scheme toDigestinstead ofBasic. Try changing toBasic. Also note that you need to regenerate the password file usinghtpasswdinstead ofhtdigest.
OmniFocus and WebDAV
To use WebDAV with OmniFocus, simply configure it as in the screenshots below.


A hat tip to Vivek for helping test these instructions on a clean Leopard installation.
This looks very good. Mind if we direct a little traffic your way?
Liz — July 10, 2008
Sure, I hope your users find this little article useful!
Manas — July 10, 2008
Great instructions. I was up and running very quickly.
thx
zuke — July 11, 2008
I’ve tried three different WebDAV setups–the first two with external servers–and this is the only setup that’s worked for me. Thanks!
I just used my internal network IP number (192.168.1.x) for the address. Because it’s a desktop machine, wired to the network, I have its IP number fixed rather than assigned by DHCP, so there’s no need for the DynDNS stuff.
Dr. Drang — July 11, 2008
[...] for future reference… [...]
Timely Snow » Blog Archive » How to set up a WebDAV server on OS X — July 11, 2008
Any chance to get the same beautifully clear instructions for 10.4? I’m not holding my breath… but I thought I’d ask ;)
Thanks!
Yann — July 11, 2008
Sure, Step 0: Get Leopard. ;) On a more practical note, I’ll see if I can get my hands on a Tiger machine, but that seems very highly unlikely.
You can modify these instructions for 10.4 Tiger as follows:
0. Backup the file
/etc/httpd/httpd.confand keep it in a safe place, e.g. on your Desktop.1. In Step 2, open the file
/etc/httpd/httpd.conf. Locate all lines that contain "dav_module" or "mod_dav" and uncomment them.2. In Step 2, add the following Include directive at the end on a line by itself:
3. In Step 3, create a new file named
/etc/httpd/httpd-dav.confand copy that entire block into it. Add this line to the top of this new file:4. Test if your Apache configuration is correct by running:
All the other instructions should still apply unchanged. Please note that I haven’t tested this, so I would love to hear from you if this worked for you. At worst, this will not break anything, and you have your backup to restore from.
Manas — July 11, 2008
I tried your instructions and it seems to work fine… I can connect to the WebDAV share via Finder “connect to server” but when trying to synch via OF, I get the same exact authentication error that I got on the 3 other setups I tried before.
At this point, I’m totally synch and tired of that synch issue… So I’m temporarily giving up.
Your instructions are good though. If someone get OF to synch on 10.4, please chime in so that I know it’s a problem with my setup, not a bug in OF + 10.4. For now it seems to be the later to me…
Thanks!
Yann — July 11, 2008
Any thoughts on how to enable it to use HTTPS?
Doug — July 11, 2008
HTTPS involves installing server certificates, and some people have reported that OmniFocus does not play well with self-signed certs. Since I’m not going to buy a certificate from Thawte or Verisign just for this purpose, (that would defeat the whole point of trying to save money with this approach! ;) ), I can’t truly promise an HTTPS HOWTO.
If someone reading this has a link to share, please chime in!
Manas — July 12, 2008
Manas and Yann,
Thanks for the wonderful instructions. I too am running OS X 10.4.
The detailed instructions plus the extra DavLockDB line were enough for me to get the new Omnifocus 1.1 alpha to sync to a local webdav server on my imac.
I was then able to get the new Omnifocus app on my ipod touch to sync with the same local webdav!!
Unbelievable. What a great resource you are Manas.
Thanks so much. You’ve made my day.
Brad — July 12, 2008
Brilliant! Thank you — this “just worked” without the headaches of doing extra installing/configuring many other approaches take. This makes the OmniFocus (desktop + iPhone app) truly useful for those of us without .Mac/.Me. The OmniGroup should send you something for posting this. Again, thank you!
Lon — July 12, 2008
Thanks so much! The change of AuthType did the trick for me.
Mike Krieger — July 12, 2008
Sorry man, this isn’t working for me at all. I get a simple “Can’t Find Host.” error immediately from omnifocus. Goliath doesn’t seem to be finding my server either. Any helpful ideas?
Jimi — July 13, 2008
Hi Jimi: What hostname are you typing into OmniFocus? It’s probably the case that your iPhone is not on the same local network as your WebDAV host, and it’s not accessible outside your network.
Trying pinging the machine directly; if that doesn’t work, then no amount of tweaking the WebDAV settings is going to work. Unfortunately, there are so many different network settings possible, it’s tough to pinpoint what the problem might be without knowing more details from you.
Manas — July 13, 2008
Your instructions came right on time. I’m in sync. I’m using Leopard and one thing I had to change in the /private/etc/apache2/extra/httpd-dav.conf
was to remove the quotes on the Alias line.
So this : Alias /gtd “/Library/WebServer/WebDAV”
became: Alias /gtd /Library/WebServer/WebDAV
I also included : DavLockDB “/usr/var/DavLock” in the file as well
Don’t know why that worked but it did.
Vinny — July 13, 2008
extreme beginner, but very anxious to get this to work in order to sync w/ my iphone sans mobileme.
i’m lost at
Enable WebDAV support in Apache. Edit the file /etc/apache2/httpd.conf, (remember to use sudo to edit it) and locate this line:
where is the file that you are supposed to edit located? Are you supposed to modify the index site in the sites folder? how is that done?
sorry about the supern00bness…
Candice — July 14, 2008
Hi Candice, this file is a system file located on your Mac, outside your home directory.
You will need to use Terminal to edit it. If you use the vi editor, for example, you would type:to start editing the file.
See T. Patterson’s suggestion below about using TextWrangler to edit this file. It’s much better than using vi if you’re not comfortable with the Terminal.
Please exercise the utmost caution in this, because it can destabilize your system or open it up to security risks. If you’ve never edited configuration files using a text editor in Terminal before, be sure to do it on a Mac that is not your primary source of livelihood.
Manas — July 14, 2008
Thanks for the write-up!
I used digest authentication instead of basic auth from the Mac and iPhone versions of OmniFocus with no problems. Just make sure the AuthName (“WebDAV-Realm” in the example above) is specified when you set the password:
sudo htdigest -c /usr/webdav.passwd “WebDAV-Realm” “YourUserName”
I also tweaked the “require” line to say “require valid-user” so that any user-id/passwords defined in the /usr/webdav.passwd file will be granted access.
Joseph Jackson — July 14, 2008
Any idea how to make this work with Leopard Max OS X Server (10.5.4?). I have webdav enabled for a website and aimed at a particular directory. It seems to move files over there but it won’t complete the synch.
J>
John — July 14, 2008
I’m really looking forward to making this work. I’ve followed the instructions, but no luck. I tried removing the quotes from the alias line as suggested by Vinny, but that didn’t seem to help. I keep getting an error message in OmniFocus (can’t find host). In checking the Library/WebServer/WebDAV, there are no files there (using the Finder).
In your screenshots, the web address is http://desktop.man…… The instructions relay http://yourdomain/webdav
The mkdir just includes a -p. Should I have entered the name of the Calander (the alias from line 1 in step 2?
Thanks for the help.
T. Patterson — July 14, 2008
Hi John: There’s some discussion of that happening in the official OmniFocus forums — perhaps they have a solution there? Because this sounds to me like an application issue.
Manas — July 14, 2008
Oops. I should’ve included the following. I can’t connect to the server via the Connect to Server in the Finder. Additionally, pinging doesn’t find the server either. I fear that somehow the server is not set up correctly.
T. Patterson — July 14, 2008
Hi T. Patterson, your machine is not available outside your local network, so you should follow the two instructions linked at the bottom of the article: first, to configure your router to make your web service visible outside the network, and second, to obtain a dynamic DNS hostname for your service.
To test if this is the case, try to access http://localhost/webdav from the same computer on which you set up the WebDAV share. If this works, then your WebDAV is setup correctly.
Manas — July 14, 2008
First of all thanks for all the help. It is truly gracious to provide this so that others may benefit. I’m sure that I’m speaking for many with my Thanks.
I still can’t get it to work. The WebDAV server is not setting up correctly. I tried to access using http://localhost/webdav but get a Page Load Error. Thus, I’m pretty sure that something went wrong in the webdav set up.
For a bit of additional clarity, I’m trying to set up my iPod Touch to connect with my MacBook Pro (running 10.5.4). I decided to go through the steps one more time. I’ve thus redone each step (returning to the original file first).
Here are the steps that I’ve taken:
Step 1 was really clear – System Preferences – Check box for starting WebSharing is turned on.
Step 2 – The first line (LoadModule dav_module libexec/apache2/mod_dav.so) had no # sign next to it. The second line did. I removed the # sign and saved the file. I confirmed that the new file doesn’t have a # sign on either line.
Step 3 – I copied and pasted the text from the gray box in Step 3. I changed line 1 (to Alias /Mobile “/Library/WebServer/WebDav”) and Line 14 to a different user name. I left the usr upload in for now. I pasted the text below the line of the usr/upload section.
Step 4 – I recreated the user account and passwords.
Step 5 – I completed the first line and was asked for a password. I completed the second line without the password. This is the part that confuses me. At this point it would seem that I would need to create the file (Mobile) for which we created an Alias for in line 1 of Step 3. The Mobile file doesn’t exit according to Spotlight (searching my Mac). I would presume that this file should occur in the Library | WebServer | Web DAV folder on my Mac.
Steps 5-7 were copied and pasted directly from the web page.
Again, no luck. Using a web browser to point to http://localhost/webdav returns a Page Load Error. Using the Network Utility to Ping http://localhost/webdav or http://Mobile/webdav returns and “Unknown Host” message. Since this doesn’t work, I’m certain that the issue is not with OmniFocus. Rather, the issue is with setting up the WebDAV server. I fear that I’m out of luck.
T. Patterson — July 15, 2008
I’m a total noob but I don’t know how to start apache.
moonimus — July 15, 2008
Hi moonimus: Step 1 (along with the screenshot) shows how to start Apache. It’s the simplest step of all! Clicking the checkbox next to “Web Sharing” will start Apache.
If somehow there’s a problem starting it, perhaps Mobile Me might be a better solution?
Manas — July 15, 2008
Hi T. Patterson: Since you changed the Alias to /Mobile, you would access your server at http://localhost/Mobile (case-sensitive.) There will be no file named “Mobile”, the alias refers to a web alias. That’s what you type in after the http://localhost/ (see my detailed note in step 3 about line 1.)
Ping is used for hostnames, not URLs, so you should be pinging just “localhost” or “google.com”, not “http://localhost” or “http://www.google.com”. Ping is often disabled on servers for security reasons, so it is normal if your machine does not reply to a ping request. That is why I specifically suggested using the Finder’s Connect To Server feature to connect to http://localhost/webdav.
Since things haven’t been working for you, I would suggest that you follow the instructions exactly, and not modify anything at all. Once you get it working, you can start to customize it.
Manas — July 15, 2008
I don’t think it’s good to take /usr/var for www.
Better /var/dav or /usr/var/dav.
Otherwise, nice instructions.
Jeremy Dunck — July 15, 2008
Hi Jeremy: We’re not using /usr/var to store webdav files. On a Mac, the standard location for that is /Library/WebServer/Documents, so for WebDAV I chose /Library/WebServer/WebDAV.
/usr/var is where the default Apache configuration on 10.5 Leopard expects to create and store the DAVLockDB, and to make that happen, the directory needs to exist. So we create it and set the correct permissions on it. The choice was already made for us by Apple, these instructions only show how to activate it.
Manas — July 15, 2008
So many thanks to Manas! I have some success. (I still need to configure my router, but at least the WebDAV server is running).
For those who are not especially comfortable using the Terminal, I used TextWrangler (free for Mac) to edit the files in Steps 2 and 3. (You can download the program from Bare Bones Software). I then copied the file pathways from the gray boxes and (in TextWrangler) went to File | Open File by Name. It was then easy to make the appropriate changes – in step 3 I inserted the text after the line that ends the usr/upload section). I used the Terminal commands for the rest of the steps (copied and pasted). (I note this only to hope that it helps someone else and I can give back to the community).
Cheers to Manas for an excellent, well documented, useful tutorial. Now on to fixing the router problem.
T. Patterson — July 16, 2008
[...] là qu’intervient l’excellent article de manas tungare, « HOWTO Setup WebDAV on Mac OS X Leopard for syncing OmniFocus to iPhone ». Il est très clair, avec des copies d’écran ; je ne vais pas le traduire sauf si plein de [...]
6502.fr » Blog Archive » Synchroniser OmniFocus avec un iPhone — July 16, 2008
Thanks for this extremely clear tutorial. Installation went like a breeze!
Christian — July 16, 2008
Thank you!! I’ve been searching for something like this for awhile. Amazing!!
Ryan — July 16, 2008
Thanks again Manas for the instructions. Hugely helpful.
Have you Manas, or anybody else reading had any success with a non-default port mapping? I had no
trouble getting my phone to sync inside my network, but outside my network I set up a forward through
my router from a nonstandard port. Omnifocus on my mac seems happy but the iphone is not.
So the question is has anybody else gotten “http://foo.example.com:1234/webdav” to work from their
iphone.
JohnT — July 16, 2008
Help!!!
I’m new to terminal but have been using various tutorials trying to learn, but I’m getting stopped rather early in the process.
Once I have apache running and run the command to get me to httpd.conf I end up seeing this:
~
~
~
~
(for 13 rows) and then “httpd.conf” 0L, 0C 0,0-1 All
I cant move through this with the arrows or really do anything. if i try to type it says “insert” but i don’t know how to get to the ability to look through the file to find the directory stuff.
Any advice?
THanks
-daria
Daria — July 16, 2008
Hi Daria: You’re likely using vi to edit your file. Admittedly, it requires a little bit of training before anyone can use it. I prefer TextMate, which costs money, or you can follow the recommendation of T. Patterson above, and use TextWrangler for Mac OS X (it’s free as in no charge.)
Manas — July 17, 2008
Thanks manas. I downloaded TextWrangler and opened the file by name like T. Patterson suggested, but for some reason my http.conf file is showing up blank. and when im looking at it though the finder its showing that it’s 0 kb on disk. What is wrong here and how can I fix it? I feel like I must have messed something up, but I don’t know what to do. Thanks
-daria
Daria — July 18, 2008
Hi Daria: It’s httpd.conf, not http.conf. Are you trying to open the correct filename as in Step 2?
Manas — July 18, 2008
Yea, I copy pasted so the mistype was only in my post. I think I figured it out when I searched thtough my computer and found that I needed the httpd.conf file that was in apache2/original not just the apache2 folder. However, I’ve followed all the instructions and am now unable to access the server.
When I’m in the sharing tab of system pref and at web sharing, clicking on the link under “your computer’s website” gives me an error that it cant connect to server. The same occurs if I add in the /whatidecidedformyalias. Am I missing a step? Or is it a port forwarding problem? THanks for your help!
Daria — July 18, 2008
Thanks! Works great! I am syncing to my laptop. Any thoughts on how to allow the syncing to continue when the IP of the laptop changes? Is there a way to use Bonjour?
SteveO — July 18, 2008
I am almost completely incompetent with Terminal, but thanks to the Text Wrangler advice I was able to make this work perfectly! Thanks so much to Manas and T. Patterson. Seriously, if I can do this, anyone can. As a side note, if anyone can advise how to start learning to function in terminal, I’d appreciate it. I got to the point where I could load the files, but had no idea how to work with them once they were there…
Darryl — July 18, 2008
Hi Daria: Try running
sudo apachectl -tto check your configuration. If there’s an error, it will note the line number and the particular file. It seems to me that Apache wasn’t correctly enabled and configured on your machine. Beyond that, I can’t suggest any specific diagnosis, so please tell us what report you get from the command above.Hi SteveO: Try the DynDNS advice at the bottom of the post; it’s specifically for machines whose IP changes.
Manas — July 18, 2008
Thanks Manas,
Unfortunately, I am looking to sync from iPhone to MBP on the local LAN where I am using NAT (Same goes at the office). If I use DynDNS, it will register the IP of my NAT Gateway in DNS which will not help. I don’t need to sync off-net, just when they are sitting side by side (since when I am away from my desk, I usually have my laptop)
Thanks again for the setup above!
SteveO
SteveO — July 18, 2008
Hi SteveO: You can still use DynDNS inside the LAN, just configure your Updater to use the locally-detected IP, and not the web-detected one (which would, as you said, end up being your NAT gateway address.) Your iPhone will make a DNS query to DynDNS outside the LAN, but will get back an internal address. It will then connect to the internal address, and things should work fine. Obviously, this won’t work when your phone is outside the local network, but you seem not to care about that case anyway.
Here’s how to do it in the standard Mac OS X DynDNS Updater:
Manas — July 18, 2008
Just ran sudo apachectl -t and the report came back “OK”
I set up a DynDNS thing, but I don’t know how to get access to that. Like, in OmniFocus under Sync would the location i type be my DynDNS host name? Or do I include the Alias I set up with the WebDAV stuff?
I apologize for my uber n00b questions.
Daria — July 18, 2008
Awesome! That worked great and I learned something new about DynDNS :)
Thanks again
SteveO — July 18, 2008
Sweet! I had to do a bit of work to get things working correctly, but now it’s working fine. Thanks so very much for providing this. Hopefully Omni can get something working SOON to make this unnecessary.
Thanks again…
Dave — July 18, 2008
Thanks for the incredible instructions and responses Manas.
Trying to view http://localhost/webdav in Safari after completing these instructions returns this error: “You don’t have permission to access /webdav/ on this server.”
I followed the instructions exactly except that I edited the two configuration files in TextWrangler and commented out the “/usr/uploads” share instead of deleting it. Any suggestions?
Donovan — July 19, 2008
Wow… lots of activity today since I last refreshed this page! I tried running sudo apachectl -t and got this result: “Could not reliably determine the server’s fully qualified domain name, using (myIPAddress) for ServerName.” In my preference pane, I noticed my address is now shown as “Macintosh” instead of the numbers shown in the apache test.
Donovan — July 19, 2008
Is there a way to sync Omnifocus iPhone to desktop locally – without going through a server. There is an option to sync to disc (in desktop version) but no way to sync it to the iPhone. Do any body knows a way around this “problem”?. Sometime I don’t have access to the web (a broadband) and still want to work on both my iPhone and my desktop.
Jonas
Jonas — July 20, 2008
Hi Donovan: it does not seem like that would matter. Have you tried accessing the WebDAV server by IP address? http://192.168.0.2/webdav
Manas — July 20, 2008
Hi Jonas: As long as your iPhone and Mac are on the same wireless network, this will work even if you are not connected to the Internet. (Make sure your iPhone is on 802.11, not EDGE/3G.) On the iPhone, use the IP that is shown in the Sharing preferences pane (as in Step 1.)
If your Mac and iPhone are not on the same wireless network, you’re SOL for now, until Omni pull some magic in the next point release.
Manas — July 20, 2008
these instructions worked like a charm – thank you!
Chinarut — July 21, 2008
With the release of 1.0.1 OmniFocus for the iPhone, it now supports self-signed certs.
Codemac — July 21, 2008
I don’t know if this will work with OF, but here’s a great walk-through on setting up HTTPS on your machine: http://www.macosxhints.com/article.php?story=20041129143420344.
ssl — July 21, 2008
I think I resolved my permission error. First I checked /private/var/log/apache2/error_log. It showed the following error whenever I tried to view webdav in my browser: “Directory index forbidden by Options directive: /Library/WebServer/WebDAV/”
What I ended up doing was adding permissions to that directory in the httpd.conf file:
Options Indexes FollowSymLinks
Order Allow,Deny
Allow from all
I think that is what got things working, but does it compromise my security? Would it help to include other directives like in step 3?
Donovan — July 22, 2008
No, that’s how it should be. Glad you got it all sorted out!
Manas — July 22, 2008
I’ve gone through the instructions twice and can log into/mount the web disk, but don’t have write access to it. 10.5.4. I’ve tried
http://localhost/webdav
http://127.0.0.1/webdav
http://IP_address/webdav
New folder: (or) Upload file:
Goliath 1.0.1: “Error: Operation is Forbiden”
Finder: Connect to server works as well, but I can’t copy over.
Perms:
drwx—— 1 bob staff 2048 Jul 19 09:23 webdav
I’m logged into OS X as “bob” (an admin of this machien).
Bob — July 22, 2008
Hi Bob: All WebDAV access happens under the user that Apache runs as, which is
www. Being logged in as an administrator doesn’t matter because Apache doesn’t use your login credentials. Make sure you perform Step 6, setting the permissions on the local directory where WebDAV files will be stored.Manas — July 22, 2008
Right, web access works under www, got it.
I tried step 6 twice (using the commands exactly as shown), just now a third time (including ‘sudo apachectl gracefu’l afterwards), same results. I wonder if the following offers a clue? Thanks a million.
pwd
/Library/WebServer
drwxr-xr-x 2 _www _www 68 Jul 19 09:23 WebDAV
Bob
Bob — July 22, 2008
Hi Bob: This looks right. Have you tried testing the server with litmus? (link is in the article.)
Manas — July 23, 2008
interesting: i can see by the replies that my situation may be unusual, but:
i can not find the file: /etc/apache2/httpd.conf spotlight only turns up the inline text for this article, saved locally. i’m a terminal noob so i haven’t gone there and i have been trying to locate it by file->open in textmate. i see a comment above that suggests to me that the file is “outside the home folder” and so… not available to spotlight?
httpd.conf does exist though, in an Apache folder in MAMP in applications. (Could MAMP be the issue? I don’t recall installing it on 10.5, but may have been brought w/ 10.4 apps folder? )
thanks for any assistance. can’t wait to hop into OF sync goodness.
Chris — July 23, 2008
Hi Chris: It’s a system file, so it won’t show up in the regular “Browse for files …” dialog. After you start Textmate and do File > Open, press Command-Shift-G to open a dialog where you can type in the path you want to access. Then paste there “/etc/apache2/” and finally browse to the file you want to edit.
Manas — July 23, 2008
Hi Manas,
Thanks. Found it. Now, once it is (theoretically) set up, where would I point Omni Focus to sync, based on this configuration:
Alias /byrnegreenOF “/Library/WebServer/WebDAV”
Dav On
Order Allow,Deny
Allow from all
AuthType Basic
AuthName WebDAV-Realm
AuthUserFile “/usr/webdav.passwd”
require user byrnegreen
Thanks for the help, I know I’m out of my league here!
Chris — July 23, 2008
Hi Chris: if you’re on a local network, try and find your IP address from the Network Configuration preferences, and use that thus: http://192.168.0.x/byrnegreenOF as the OmniFocus sync location.
Manas — July 24, 2008
I don’t know how well this will work for others, but it seems to work for me: if you are (like me) setting up your WebDAV server on your portable machine, and that machine can switch IP addresses depending on location, you can just use the Bonjour addressing scheme:
http://YourMachineName.local/webdav/
(where “YourMachineName” is… well, you get the idea ;-)
YMMV
J Thompson — July 24, 2008
Works like a charm !!
I can’t thanks enough this well written tutorial. After all these waiting…. I finally get my omnifocus desktop and iphone app talk with each other.
Great work, thanks !
Michael — July 25, 2008
Thanks for the outstanding tutorial Manas!
It’s been going great up until I actually attempt to sync my iPod Touch with the server. I used Goliath as per your suggestion and my OmniFocus back-ups are being displayed and are correct. The problem is that whenever I attempt to sync with the iPod, I seems to just hang for a while, then I get the message: “Unable to synchronize database with server. timed out”. Do you know why this could be happening? Any help would be greatly appreciated!
Thanks,
danrel
danrel — July 26, 2008
Oh, BTW,
Both my Mac and the iPod are on the same wireless network…
Thanks again
danrel — July 26, 2008
to whoever find it useful … ii had problems with the iphone connecting to the webdav server, apache’s log just showed a 401 error…., at the end it was that the webdav.passwd needed a chown www:www … ,
adajet51 — July 30, 2008
Manas, thanks for the great instructions. In comment 7.3 when you are giving the instructions for OS 10.4, what block are you referring to when you write “3. In Step 3, create a new file named /etc/httpd/httpd-dav.conf and copy that entire block into it”. Thanks very much.
Alex
AlexH — July 30, 2008
Hi AlexH: This block:
Alias /webdav "/Library/WebServer/WebDAV" <directory "/Library/WebServer/WebDAV"> Dav On Order Allow,Deny Allow from all AuthType Basic AuthName WebDAV-Realm AuthUserFile "/usr/webdav.passwd" <limitexcept GET OPTIONS> require user YourUserName </limitexcept> </directory> </pre>Manas — July 30, 2008
First of all thanks for the nice write up.
I followed all the instructions and am able to access my newly created WebDAV server through Goliath and I am able to upload, read, and delete files. I then enter my information into the OF sync prefpane and click sync and it syncs to the server successfully. If I login with Goliath I can see the OmniFocus folder that was created by the initial sync to the server. So then I click “Share Setting” so that I can configure the iPhone client. Here’s where I run into the problems, the iPhone client is configured with the proper information and then it prompts me for my username and password, I enter the same information used to log into the WebDAV server using Goliath and then when I hit “Log In” it just sends me back to the same login prompt to login to the secure website and it continues in a loop like this without ever letting me actually log in and sync with my WebDAV.
Does anyone have any idea why this would be happening? I assumed since I am able to login through Goliath and sync to the WebDAV with the Mac client that the iPhone app would be able to also. Both the macbook and the iphone are on the same wifi network. Any help would be greatly appreciated.
Brendan — July 31, 2008
thank you so much for this guide. i can now finally get rid of mobileme! :)
(rez) — August 1, 2008
Thank you! I don’t have OmniFocus on the Mac, so I’m simply backing up my iPhone data, and when I just checked the WebDAV folder a few minutes ago, there was an OmniFocus directory with all my stuff backed up. Perfect!
Can we send a donation your way or to the charity of your choice as a thank you for doing all this work?
Becky — August 2, 2008
I’m running into the same problem as Brendan in comment 74… iPhone just throws the login fields back at me with no notice or error in between.
Tobbi — August 2, 2008
Hi Becky: Glad this worked well for you! Thanks for your appreciation, both verbal as well as the offer to donate. Would PayPal work for you? My ID is manas@tungare.name. Thanks!
Manas — August 2, 2008
Hello, i have the same problem as brendan… i tried 3 diffrent server-systems.
omnifocus on mac syncs fine, i can connect with finder too.
but on iphone i just get the login prompt in a loop. no idea, nothing errorlike in the logs, just one line:
192.168.0.101 – - [03/Aug/2008:22:48:14 +0200] “PROPFIND /webdav/OmniFocus.ofocus HTTP/1.1″ 401 401
any one an idea? mail flo attttt dievolksvertreter.de
cheers, flo.
flo — August 3, 2008
I finally got it syncing properly! Thanks again for the awesome tutorial.
-danrel
danrel — August 3, 2008
Indeed, very good post!
I would consider to add “Require valid-user”, if you do not want others to look into your todo lists:
require user YourUserName
Require valid-user
Otherwise you might just point your browser to that link and read the omnifocus database.
Furthermore I removed “GET” and “OPTIONS” from the LimitExcept directive.
“AllowOverride None” is another candidate to think about. Might this rise problems with omnifocus? Otherwise I would recommend that, too.
bests,
Samuel
Samuel John — August 6, 2008
Hi Samuel: It was the removal of the GET and OPTIONS from the LimitExcept that served your purpose. Adding a “Require valid-user” did not help in this case, because the line above it: “Require user YourUserName” does exactly the same thing.
Manas — August 6, 2008
I had a bit of trouble, with all looking good, but getting this error message:
“the server returned “bad gateway” (502) in response to a request to “MOVE /webdav/OmniFocus.ofocus-copy-in-progress-pMZvOsjWwRG”.”
Any thoughts? By the way, I’m doing all this on OS X.3, but used the OS X.4 modified instructions and all appears to be in good shape (other than that it doesn’t work…. :)
Matt
Matt — August 7, 2008
It is true that some of the free WebDAV servers are not working so well (e.g. box.net), but the OmniFocus forum mentions BingoDisk, which is only $19/year and has worked perfectly for me. Thanks for a great contribution Manas, you obviously know your stuff, but if any of the noobs are having trouble with this, keep in mind that there are much cheaper options than MobileMe that will have you up and running in 5 min.
dusty — August 8, 2008
I’d like to set things up so that my wife and I can sync to the same server; before I start, how does OmniFocus find the file? Should I set up two different shares, one for me, one for my wife?
Andrew — August 8, 2008
Danrel,
If you could let me know how you solved your problem. I finally got the WebDAV running, but now I have almost the same error:
Unable to synchronize dtabase with server can’t find host
You had a time out, maybe it’s similar…
Thanks to anyone that can help.
-Christopher
Christopher — August 8, 2008
Well, it seems it was worth trying for 2 hours and staying up until 3.00AM, as I solved my synch problem (post 85 right above).
For the record: I had a “can’t find host” problem. YMMV suggested using at one point to use the Bonjour scheme for the naming of the server.
Whereas my iPhone had detected the webdav server to be at http://localhost/webdav when I sent the configuration settings from the Mac, in fact changing it to http://MachineName.local/webdav solved it all.
These ‘MachineName.local’ can be criptic to some of us (and no one tells you otherwise you can connect to their computer!), but the easy way to know that is to go to System Preferences. Click on Sharing. At the top of the window, you’ll see ‘Computer name’ with some piece of text next to it. Below, in a smaller font, you have a sentence saying:
“Computers on your local network can access your computer at: MachineName.local”
That’s what you need!
But really, the OmniFocus database is a local file, why can’t it simply be synchronized when the iPod or iPhone is plugged in?
-Christopher
Christopher — August 8, 2008
Hi Andrew: Yes, two different shares will be a good idea. You can also create two folders within the same share, but I’d pick the two-shares option.
Manas — August 8, 2008
hi,
thanks for the great tutorial. in my finder it works perfectly. but I also have that omnifocus-on-iphone “sends me back to login in” all the time problem. has anyone solved this yet??
thx
best rob
rob — August 9, 2008
Manas, I can’t thank you enough for posting these instructions. Everything worked like a charm, twice! At first I set up my desktop with dynDNS and that was working fine to keep my laptop and iPhone in sync. Then I realized that my laptop and my iPhone are always on the same network together no matter where I go, so I setup the WebDAV on my laptop and and connected to MachineName.localhost, bypassing the need for a third “always on” computer. Thank you for making this clear and easy.
José — August 10, 2008
So I followed these instructions for Tiger and after I bit of tinkering I seem to have got it working last night. I can put my webdav url in with the finder and a folder/volume mounts. I can drag files into it, empty the trash, and pull files out of it.
I’ve done this from the local machine and also from another machine on the LAN. I also mounted it from a remote machine over the internet in an SSH tunnel (but I didn’t try putting files in and out of it). I also tested it with goliath and it seems to mount (didn’t test putting files in and out here either).
That being said, when I put the url in the browser on my local machine, it says I don’t have the requisite permissions to access the directory. Same goes for trying to do this over the internet in a secure port-forwarded tunnel.
So that’s the prelude. Here is the meat of my question. When I tried to sync OF to my webdav folder, it said that the sync failed. Subsequently, I succeeded in syncing using the direct disk method, by mounting a volume from my desktop on my laptop using apple file sharing and syncing off that.
Any thoughts on why webdav syncing might now be working. My laptop is a new macbook with Leopard 10.5.4. Desktop is PPC with 10.4.11
J-Lon — August 15, 2008
Not seeing the last comment I left. Since then I realized there was a place to get a bit more info. This is the error message:
The 127.0.0.1 server returned “bad gateway” (502) in response to a request to “MOVE /omnisync/OmniFocus.ofocus-copy-in-progress-gBfNwM_yiCd”.
Any thoughts on how to address this?
J-Lon — August 15, 2008
Made some progress here. Someone on the Omni list suggested that I add a Servername statement to my config file and include the name of my mac form the Websharing pref pane. You can read that thread here:
http://forums.omnigroup.com/showthread.php?t=9416
Might also make sense to revise the 10.4.11 instructions to tell people to include the Servername (unless you already told people to do that, and I just didn’t, because I’m not very knowledgeable about this stuff and didn’t understand what I was supposed to do).
Anyhow, including that servername statement allowed me sync the copy of OF on my desktop to the webdav on the desktop. I’m assuming it would have also allowed another computer on the LAN to do the same, but I haven’t tested it.
My next test was to try and sync my laptop to webdav by accessing the webdav volume over the internet through a port forwarded ssh tunnel into my lan. That unfortunately didn’t work. I’m back to the error above. Any thoughts on that. Is there any way to set up the config file so that the server knows that my lan IP address and the name of my computer (e.g., billybob’s-g4.local) are the same thing. I ask because my lan router is configures to forward port 22 to my desktop’s hard assigned internal ip address (I’ve got a dyndns server name on the outside). So I’m wondering if the server is getting confused by this outside request.
I can get to the webdav volume using the finder or goliath over the ssh tunnel. I can’t get to it using the browser (fwiw).
J-Lon — August 17, 2008
Worked like a charm, thanks!
Great instructions, but I’m not one to use a shell-based text editor so I sudo chmod’d the files so I could use jEdit, then set their permissions back.
salsa — August 17, 2008
thanks, you rock for posting such a clear guide!!!
jd — August 17, 2008
I would like to set up our os x server as the sync site for our users with iPhones. It would be very helpful if you (or anyone) would post a walk through example of how to set this up. Using the example here, I was able to set up a single sync location in my WebDocuments folder but now anyone who syncs to that location gets the last persons info… not very useful. I’ve tried creating other folders within WebDocuments but OF keeps asking for a username and password and does not accept anything. I’ve also put an alias of a home director in WebDocuments but OF gives me the “The osxserver.com server returned “bad request” (400) in response to a request to “PROPFIND /user/OmniFocus.ofocus”.” error.
Jim Putnam — August 19, 2008
Well, I figured it out. Using OS X Server Admin, Workgroup manager and the Finder:
1. In the Finder create a new folder/directory in WebDocuments (I called it omni)
2. Again in the Finder create a folder for each omnifocus user inside the omni folder.
3. In Workgroup Manager create a new group called omni and put your omnifocus users in the group.
4. In Server Admin go to File Sharing, go to the omni directory. In the Permissions window, add the Group “omni” and set the permissions to Read & Write and set the permissions on “-www” to Read & Write.
5. Still in File Sharing Permissions, select each user’s file in turn, add the user to permissions in each corresponding directory and set the permission to read & write for the user and for -www.
That’s it. Now users can sync to https:///omni/ They’ll need their server username and password to authenticate.
Doing all this worked for me. I’m not sure the Groups step
Jim Putnam — August 19, 2008
I’m not it’s necessary to set up the Group but I don’t have time to test it without.
Jim Putnam — August 19, 2008
I’m lost. I enabled web sharing and opened up terminal but don’t know what to do next.
I typed in /etc/apache2/httpd.conf but don’t know what sudo means. Can you walk me through how I get to all these files?
Thanks.
TINA Z — August 20, 2008
YOU SAVED ME AT LEAST $100
THANK YOU, I LOVE YOU
for the record, I know anything about terminal, and this all worked fine as long as one follows your instructions to the T.
Because I didn’t, enabling the root user with directory utility helped me out.
Thanks again!
Daniel D — August 20, 2008
Your howto worked like a charm.
Thanks a million.
Christoph — August 23, 2008
Did anyone solve errors 74, 77, 79? I am having that exact problem.
John — August 24, 2008
I think I followed the directions exactly, but when I try to sync I get the message below. Any thots?
Thanks!
Unable to synchronize database with server.
Unable to perform WebDAV operation.
The SH.local server returned “method not allowed” (405) in response to a request to “PROPFIND /webdav/OmniFocus.ofocus”.
Seth H — August 26, 2008
Seth; I had the same error and it was because I was using the ‘real path “WebDAV” not the alias “webdav” in my url in the OmniFocus.
e.g., you want http://192.168.1.2:82/webdav
not http://192.168.1.2:82/WebDAV
lee hinde — August 30, 2008
Thanks a lot for publishing this! Following the instructions was very easy. I tested my new WebDAV server with Goliath and it lets me login using the password I created and everything. But on my iPod touch when I enter the same login and password it keeps asking me again and again for it and never lets me through… I know that I’ve configured the WebDAV server correctly since I can connect with Goliath, but is it a software problem?
Dave — August 31, 2008
I found that I had to update my OmniFocus on the iPod touch and then it worked perfectly… I must’ve had an old version and never bothered updating it… Anyone that’s getting the password loop should try this!
Dave — August 31, 2008
These are great instructions. Even someone such as me, who trembles anytime some says to do something in Terminal figured it out, sort of. I am stuck at step 4. What is “htpasswd” tool?
I believe I will be stuck at steps 5,6,and 7 as well. Will I make these changes using TextWrangler (thanks T. Patterson for mentioning this, I love free). What file will I change?
Sorry for low-brow questions.
Also is there any reason to make a fancy name for “webdav” or will simply “webdav” do?
Thank you again.
reb
booth.robert.e@gmail.com
robertbooth — September 3, 2008
Did someone succeed in setting up the synch running WebDav on Leopard Max OS X Server (10.5.4?) I saw a request for help on 7/14 but could not find a reply. We’d rather set this up on one of our servers rather than on a workstation. All help is greatly appreciated.
Thank you.
nick — September 5, 2008
Nick, I don’t think youre going to get much by way of a response. I’ve been waiting for a couple days now for an answer and no luck. I think most people active on this forum have moved on.
Might want to look elsewhere
reb
robertbooth — September 5, 2008
Hi Robert, sorry I’ve been busy with other things, and only approving comments, unable to reply. I was hoping others would chime in in the meanwhile.
Robert: htpasswd is a command you would type at the Terminal prompt. Line 1 of Step 4 uses the htpasswd tool, so just type in what you see on that first line.
Nick: see comment #97.
Dave: glad it worked for you, and thanks for returning here to share your solution.
Seth: not sure what the exact problem might be, please try running the debugging tool litmus as mentioned in Step 8.
Manas — September 5, 2008
Hi !
I’ve followed the instructions to the letter, but when I run the litmus tool, I see this problem appear :
-> running `basic’:
0. init……………… pass
1. begin…………….. FAIL (Could not create new collection `/webdav/litmus/’ for tests: 403 Forbidden
Server must allow `MKCOL /webdav/litmus/’ for tests to proceed)
<- summary for `basic’: of 2 tests run: 1 passed, 1 failed. 50.0%
See debug.log for network/debug traces.
And it is the same for the Goliath tool, it seems the user/password are not okay with the server.
I’ve checked permissions on my folders and files, and have run twice the htpassword tool, so it doesn’t seem to be the problem.
Emmanuel — September 7, 2008
Aloha Manas,
Thank you for the reply. I am sure you are very busy and it was kind of you to take the time to answer. I think it was Friday last that I used Terminal to carry out steps 4, 5, 6, and 7. So, I think I am good to that point.
However, in step 8 you write, “That’s it, you can now point OmniFocus to http://your-server-name/webdav.” The “webdav” part of that address is the “youre-fancy-webdav-share” from step 3. But I don’t know where to find the “youre-server-name” part of that. I have read the other comments and haven’t found that answer. In the Synchronization Preferences pane you show that url as “htpp://desktop.manastungare,net/webdav/.” I tried a variation of that but without success.
Thank you again for this set of instructions.
Aloha,
Robert Booth
booth.robert.e@gmail.com
robertbooth — September 7, 2008
Aloha Manas, or other following there comments
On re-reading the comments, particularly #4, #87, and #104, I think I solved my last question about the URL wording. I used the url on the Web Sharing Pane of the Sharing Pane of the System Preferences. In my case it was http://192.168.0.7/. I appended that with my chosen “your-fancy-webdav-share” from step 3. I then used that url in Goliath and after correctly entering my username and pw into a New WebDAV Connection i get an alert telling me “The server specified does not support the WebDAV protocol.”
I did the sudo apachectl -t check that you suggested to Daria in #43 and did not receive an error.
I am guessing that I am not using Goliath correctly.
Something I notice is that while the url for my computer is 192.168.0.7, the url for my iPT is 192.168.0.5. I am guessing this is because they are both using the same wireless router/modem that is assigning them different numbers.
Aloha,
Robert Booth
robertbooth — September 8, 2008
All is well! Works perfectly.
These were the little things I didn’t quite do right.
First I uncommented the wrong line in the second part of step 3.
Fortunately, at the suggestion of a good friend who works with unix “stuff” I made a comment above the incorrectly modified line reminding myself what I did. I was therefore able to re-comment the line and uncomment the correct line.
I still had the same weirdness with Goliath. But then after rereading the instructions in step 3 I figured out that I probably needed to restart Apache, gracefully, of course. After this Goliath connected with my webDAV alias perfectly.
I then entered the url from the web sharing pane of the sharing pane of System Preferences with my webDAV alias appended to it into the location line in the Synch Prefs of OF. Clicked Synch Now and Voila! it asked for my username and pw. Worked from my iPT to my MBP just as easily.
If anyone has questions about problems like mine you can email me to look here for your questions. I probably won’t be a lot of help, as you can tell I don’t really know what any of this stuff really does, but I might be able to help you.
Aloha,
Robert Booth
booth.robert.e@gmail.com
robertbooth — September 8, 2008
hello,
I have followed all instructions, I have left the alias as webdav – here is the file -
DavLockDB “/usr/var/DavLock”
Alias /Webdav “/Library/WebServer/WebDAV”
Dav On
Order Allow,Deny
Allow from all
AuthType Basic
AuthName WebDAV-Realm
# You can use the htdigest program to create the password database:
# htdigest -c “/usr/user.passwd” DAV-upload admin
AuthUserFile “/usr/webdav.passwd”
# Allow universal read-access, but writes are restricted
# to the admin user.
require user Brownboy
I have followed the other instructions to the letter, but when I try to connect using Goliath,
I get the error : “The Server Specified does not support the WebDav Protocol.”
I tried to access via safari, by typing http://localhost/webdav/ which didnt work,
but then thanks to advice I checked my error log, which informed me that;
[Mon Sep 08 10:11:41 2008] [error] [client 192.168.1.5] File does not exist: /Library/WebServer/Documents/webdav
suggesting that the alias is pointing to /Library/WebServer/Documents/webdav
as opposed to /Library/WebServer/webdav
but I cannot seem to get any further. I am editing the conf files using Text Wrangler, which seems to be fine, my problem is it just doesnt seem to be doing anything.
If anyone has any solutions I would be very grateful
Alex
Alex — September 8, 2008
I think its just the matter that changing the httpd-dav.cof file doesnt seem to have any effect on anything. having adjusted the alias, it just seems to be looking for a folder rather than using the alias.
goliath still doesn’t work,
Im not sure what to do.
Thanks for the great tutorial, but this one is being a bit tricky for me.
Alex
Alex — September 8, 2008
Aloha Alex,
In spite of any errors you are getting I promise you that the instructions Manas gives here will work. It took me several tries and as many hours to get it working but I have a running webDAV on my MBP and OF synchs between it and my iPod Touch. That being said I will give you some of the mojo I discovered.
Be very careful when you say you followed the instructions to the letter.
In the first line of Manas’s instructions in step 3 the code is
Alias /webdav “/Library/WebServer/WebDAV”
you used “Webdav,” which probably doesnt make any difference as long as you were consistent in using “Webdav.” But it does point up the questions when you write that…”Did he really follow it to the letter?” “When he says to the letter does he include he followed it to the capital lettters, too?” That being said…
The problems you are having sound suspiciously like the problems I had. I am going to hazard a guess that you may have made one or two of the same errors.
First, using TextWrangler open the “/etc/apache2/httpd.conf” file. The easiest way to find it is using the find by name (Cmd-D) command in the File Menu.
Make sure the line “LoadModule dav_module libexec/apache2/mod_dav.so” is uncommented, i.e. there should be NO “#” at the start of the line. In my case this line wasn’t commented. So I didn’t have to change anything. If you have to change it I would suggest you make a few comments noting that you are changing it. That way iF you change the wrong line, as I did in the next step, it is easy to revert and start over.
Scroll down through that file and find near the end the line that says “Include /private/etc/apache2/extra/httpd-dav.conf”. In my case this line was commented. So I had to delete the “#” that started the line. Now, actually I initially changed a line that looked very much like that line but wasn’t. I found my error when I went back and double checked. I would suggest you do the same as we are having the same problems and getting the same sort of results from Goliath, and etc. Then, close this file. It will ask you if you want to save it and say yes and it should ask for your system password, enter it. After it closes, just for good measure, and since were here open the same file using the find by name command. The file name will still be there so it is easy. Open the file again and check to make sure your changes, “took.” This time you should just be able to close the file.
Next open the “/etc/apache2/extra/httpd-dav.conf” file. You are going to do two things to this file. You are going to delete this section:
Alias /uploads “/usr/uploads”
Dav On
Order Allow,Deny
Allow from all
AuthType Digest
AuthName DAV-upload
# You can use the htdigest program to create the password database:
# htdigest -c “/usr/user.passwd” DAV-upload admin
AuthUserFile “/usr/user.passwd”
# Allow universal read-access, but writes are restricted
# to the admin user.
require user admin
Actually, better trade craft is to put a “#” before each line to make each line a comment. That way you have the code there if you decide sometime in the future that it is needed. But in either case you want to disable those several lines.
Then Copy and Paste in the lines from Manas’s instructions:
Alias /webdav “/Library/WebServer/WebDAV”
Dav On
Order Allow,Deny
Allow from all
AuthType Basic
AuthName WebDAV-Realm
AuthUserFile “/usr/webdav.passwd”
require user YourUserName
Don’t type it. Copy and Paste it. And when you have to name the webDAV alias name it bbzwebdav (for Brownboy’s webDAV). So the code you are going to COPY and PASTE into the “/etc/apache2/extra/httpd-dav.conf” file will actually be,
Alias /bbzwebdav “/Library/WebServer/WebDAV”
Dav On
Order Allow,Deny
Allow from all
AuthType Basic
AuthName WebDAV-Realm
AuthUserFile “/usr/webdav.passwd”
require user Brownboy
Close the file and save it.
You can Quit Text Wrangler.
Now you have to go to Terminal (You might be able to do this in Text Wrangler, too, I don’t know. I do know you can do it in Terminal. That’s what I did and everything is working fine on my machines.) It’s in the Utilities folder of Applications folder. FOR NONE OF THE LINES YOU ENTER INTO TERMINAL DO YOU ENTER THE QUOTES I HAVE INCLUDED BELOW. EXCEPT FOR THE QUOTES AROUND YOUR USER NAME IN THE FIRST LINE. Copy everything between the outermost quotes and paste them into Terminal. After the first line you will be asked for your system password.
Start Terminal and after the first line enter
“sudo htpasswd -c /usr/webdav.passwd “Brownboy”"
Terminal will ask you for your machine Password. Enter that password.
Then it will ask you for the password you want assigned to Brownboy
New password:
Then it asks you to confirm the password,
Re-type new password:
Then it tells you it is adding that password to Brownboy
Adding password for user YourUserName
Next, continuing to COPY and PASTE into Terminal (make sure you do a carriage return after each line).
“sudo mkdir -p /Library/WebServer/WebDAV”
“sudo mkdir -p /usr/var”
and
“sudo chown -R www:www /Library/WebServer/WebDAV”
“sudo chown -R www:www /usr/var”
“sudo chgrp www /usr/webdav.passwd”
and finally,
“sudo apachectl graceful”.
Exit this Terminal session by entering “Exit” to logout. Then Quit Terminal.
Now, you can test using Goliath. Before that you need something from the very first step when you started Web Sharing in the Sharing Pane of the System Preferences. In that pane, under where it should now say “Web Sharing On” it should say “Your Computer’s Website.” The address there is “your-server-name” in Manas’s step 3 where he writes “http://your-server-name/your-fancy-webdav-share”. Most likely the url Goliath will ask for is going to look like this “http://192.168.0.7/bbzwebdav/”.
So start Goliath and enter the url into the New WebDAV Connection pane. Enter Brownboy and whatever you chose for your password. Return for OK and Goliath should connect.
In my case I didn’t uncomment the correct liner and I had to revert the one line and correct the other using Text Wrangler. But after I did that I kept having problems. The reason was I didn’t restart Apache using the “sudo apachectl graceful” line of code in Terminal.
If, Alex you have followed these instructions to the letter, don’t type anything Copy/Paste everything. And you are having trouble then I am going to guess that earlier you made a mistake somewhere and that is hanging things up.
In #43 above Manas replies to a commentor that “it seems to me that Apache wasn’t correctly enabled and configured on your machine.” He suggested “unning sudo apachectl -t to check your configuration.” If you do this do it in Terminal.
My guess is that when you first tried these instructions you mis-entered something. It is easy to do, as I can readily testify to.
Good luck. These instructions will work.
Aloha,
Robert Booth
booth.robert.e@gmail.com
robertbooth — September 8, 2008
Damn! Its so easy to make a mistake in this stuff…
The section you will disable in the file named “/etc/apache2/extra/httpd-dav.conf” is
#Alias /uploads “/usr/uploads”
#
# Dav On
#Order Allow,Deny
#Allow from all
# AuthType Digest
# AuthName DAV-upload
# # You can use the htdigest program to create the password database:
# # htdigest -c “/usr/user.passwd” DAV-upload admin
#AuthUserFile “/usr/user.passwd”
# # Allow universal read-access, but writes are restricted
## to the admin user.
#
# require user admin
#
#
I left out the last two lines.
reb
robertbooth — September 8, 2008
hmm weird, for some reason the last two lines of the code you are going to delete AND the last two lines of the code you are going to include are not showing up in these comments.
Those lines are, in both cases
But without the s p a c e s between each character.
reb
robertbooth — September 8, 2008
@Alex
It seems that in the main httpd.conf you did not remove the sharp in front of “Include /private/etc/apache2/extra/httpd-dav.conf”.
Thus, the main Configuration file doesn’t know you have set an Alias, so it searches in the “standard” location which is /Library/WebServer/Documents.
In my problem, I still doesn’t know why my user/passwd is refused. (See comment #111)
If anyone has an idea, it would be great !
Emmanuel — September 9, 2008
Thanks Robert,
your tips have helped me get a little further,
however I am once again stuck, now it says:
server returned “forbidden” (403) in response to a request to “PROPFIND /bbzwebdav/OmniFocus.ofocus”
my error log returns with – [client 192.xxx.x.x] client denied by server configuration: /usr/\xd2
It all just seems to be forbidden access, but I have done all the listed permission changes.
I dunno if this means anything to anyone?
Any help would be greatly appreciated
Thanks
Alex
Alex — September 11, 2008
Awsome…Up and running in minutes.
Jeremy — September 11, 2008
I am also having the problem where OF on the iPhone keeps prompting me for the username / password over and over again. OF on my mac worked fine, but the OF on iphone keeps asking for username / password even though i enter the combination I set up in step 4 (and which worked for the sync from my mac). Thanks in advance for the help!
graeme — September 12, 2008
I’m also getting a Forbidden message (like Alex). From iPhones omni focus is the same error message. From safari I get:
“Forbidden
You don’t have permission to access /webdav/ on this server.”
The strange thing is everything was working fine for weeks. I’m not sure what changed since my last sync. (I updated QT and iTunes maybe there was a security update I’m not remembering too).
I re-checked the config files and the permissions. Everthing seems the same as described on this page.
Anyone have any suggestions?
Eitan
redfood — September 15, 2008
Thanks for the awesome guide! I expected some irregularities in the process but I followed your instructions to the letter and it works great. It’s a great little introduction to WebDAV also, which I had heard a lot about but never experimented with. It does seem like there might be a market for a shareware app that can do this configuration with a couple of clips, what I don’t get is why OmniGroup hasn’t done this.
Gabriel — September 16, 2008
Manas,
Huge THANK YOU for these instructions. I am running Tiger and got OmniFocus syncing working with your clear instructions.
Marcin — September 21, 2008
Hi,
I had some issues above, and like a true noob somehow (with your help) stumbled upon the issue and remedied it without knowing exactly how I did so. I was happy just to have it working
Somehow, I reset the sync settings and now I am stuck again. (It’s easy to reset them accidentially in OF on the Mac)
Rather than waste your time trying to untangle this bird’s nest, I think I should start from scratch… so:
Can you advise on how I would restore the files to their original configuration?
Thanks!
ByrneGreen — September 22, 2008
Bravi, ottimo sito, ci ripasserò.
chat — September 26, 2008
Hi,
I followed all tutorial. I created an Alias named “olivier-webdav” like this Alias /olivier-webdav “/Library/WebServer/WebDAV”. with a User name “Olivier”
Impossible to access to my server.
My webdav server was created in “Library/Webserver/WebDAV” and I can copy a file in the directory.
What should be my access adress ? http://olivier-webdav/webdav ? or something else ?
Thanks for your help
Olivier
Olivier — September 27, 2008
Regarding HTTPS support…
I have OmniFocus 1.1 (sneakypeek, 2008-10-01, Revision: 105369) successfully running as a secure WebDAV client using HTTPS protocol as well as my 3G iPhone running the OmniFocus iPhone app also using HTTPS as a WebDAV client, both connecting separately to a common secure WebDAV server. Since I run my own local DNS server and I manage my own firewall to the Internet, I’m able to connect securely without issues from within my local network as well as when I’m running around outside on the Internet.
I had already built my own Apache2 server (Apache/2.2.0 (Unix) mod_ssl/2.2.0 OpenSSL/0.9.7l DAV/2 …) with HTTPS/WebDAV already enabled to run as a secure Subversion server. So adding the WebDAV service and HTTPS support for OmniFocus was not too much different to set up. I don’t think anyone has to built their own server though, the standard built in Apple Apache2 configuration should work just as well.
Points to look out for:
Make sure the directories exist with the right permissions on the web server
Make sure the WebDAV permissions for the enabled directory are set correctly, e.g., MKCOL is enabled for the particular user that is set up to access the server
It really helps to understand what the configurations mean and do for both Apache, SSL, and for the WebDAV protocol. This will be essential later when something (inevitably) breaks months later and you’ll have to figure it all out again.
In general, there are so many configuration items to take care of in setting up the secure service that it is easy to miss something or make a transcription mistake. Coupled with minimal debugging tools, it isn’t surprising that many find the setup difficult.
To debug, I monitored the apache access_log and especially the error_log file (use “tail -f” to watch the logs in real time) to catch errors. I didn’t really use litmus or goliath, just using the browser (firefox is what I use) or simply trying to mount the WebDAV server from the Finder (CMD-K) was good enough for me to test the configuration as I went along.
Hope this helps,
Brian
BrianD — October 4, 2008
[...] I said that I use mobile me for syncing, but if you feel adventurous you can try to sync via webDAV, and get some advice here: :HOWTO Setup WebDAV on Mac OS X Leopard for syncing OmniFocus to iPhone. [...]
OmniFocus for iPhone – a GTD application reviewed — October 15, 2008
Just got it working on Tiger! Thanks for the instructions!
Followed the somewhat modified instructions and got to the point where everything seem to work, except OmniFocus sync due to the 502 error.
I found the solution in comment #93 that sent me to a thread in the omnigroup forums. As soon as I added the Servername in httpd.conf OmniFocus synced just fine.
george — October 15, 2008
Hi. Your instructions are great. Thx a mil for sharing this.
I got the sync working with a static IP, but I guess I would need to setup DynDNS to get it work when I am connect at work.
I have created an account but I am kinda stuck in how to setup the DynDNS… how to setup the hostname, the service type to choose, etc… Would appreciate some guidelines here.
Cheers
T.Tim — October 23, 2008
Wow, it worked. Thanks a lot for that.
Steven B — October 24, 2008
[...] to try switching OmniFocus from iDisk to a WebDAV server. I found a page with good instructions on setting up WebDAV on OS X. If you go do to do this please note two things: I’m able to use a self-signed web [...]
Tim’s Snarking Post » Blog Archive » OmniFocus, WebDAV, and OS X — October 25, 2008
I’m falling at the second hurdle!
I have little experience using Terminal, and I’m getting the following response to: sudo open httpd.conf
No application knows how to open /private/etc/apache2/httpd.conf.
ANy ideas would be greatly appreciated
Ben Neale — October 26, 2008
I would like to relate my experience. It might be useful.
I have put the Omnifocus database on my laptop computer at my office. I wanted to sync my IPod Touch with it.
My local adress in the web sharing is like “http://mac9999.zozor.fr”, and it is in the network of the company. Everything works fine, as I follow the instructions (congratulations, it is very clear and useful, and not to geeky). Personaly, I used Onyx to see invisible files and TextWrangler to edit the httpd’s Apache documents.
To sync my Ipod to the DB on my laptop, I will need to turn the VPN on each time I want to synchronize. It’s like entering the network of the company, and thus being in the same network as my laptop.
weheeee !
greg — October 26, 2008
and furthermore, as you said I spend a little time to fix this but I spared 90 euros a year for the MobileMe.
Any issues about sync possilbilities between OpenXchangeOmnifocusIphoneIcal, etc. ??
greg — October 26, 2008
Nice Job! Worked great except that I had to enable access to webdav via the security (firewall) options in preferences.
Russ — November 5, 2008
[...] http://manas.tungare.name/blog/2008/07/10/howto-setup-webdav-on-mac-os-x-leopard-for-syncing-omnifoc… More Related Jobs in computer Jobs in losangeles. Next: Junior Graphics Website Designer Previous: Need graphics person to help me with my book’s maps [...]
need help setting up apple web dav | computer Jobs in losangeles — November 19, 2008
I am admirative that some people seems very please with the explanation since it seems like chinese to me
(first it has been hard to find the file)
in point 3: I cannot save the httpd-dav.conf file the mac said that I have not the autorisations: what can I do ?
(is there any script to do this stuff automatically ?)
françois — November 19, 2008
Do you know if I can setup a network attached storage as backup destination? I have a Linkstation external hd that connects to the back of my router would like to setup web dav on mac but still wanna store files to NAS. Thanks in advance!
Ace — November 27, 2008
[...] I’ll use Gentoo Linux to explain the single steps but it should be similar on different platforms. There is also a tutorial on how to configure Leopard to speak WebDAV. [...]
Synchronizing OmniFocus via WebDAV on Gentoo Linux at stiefels.net — November 30, 2008
@Seth
I was having the exact same problem as you. I even went through the steps a couple of times. The problem I was having turned out to be that I didn’t uncomment the correct line in my httpd.conf
I used VI to do the edit the file and did a search for the string “Include /private/etc/apache2/”. I thought I found the correct line but it wasn’t. I’d say double check and make sure you are uncommenting the correct lines. Read them letter for letter.
Good luck
Thomas
thomas — December 5, 2008
Thanks Manas. I’d given up on setting up the server before when I’d tried the same months ago, but this had me up-and-running in under 20 minutes. Very useful guide. Great work!
mr — December 28, 2008
[...] help Anyone used WebDAV? I’ve just tried setting it up as per http://manas.tungare.name/blog/howto…cus-to-iphone/ and I’m having problems. I can connect using Finder to http://my.internal.ip.address/webdav OK. I [...]
webdav help | hilpers — January 18, 2009
thank you so much, instructions worked perfectly
timothy — April 27, 2009
I’ve followed these instruction twice for 10.5.6 and I can’t connect to the webdav by any means even in safari typing http://localhost/webdav or http://10.0.1.2/webdav nothing works, I’ve tried restarting, I’ve checked the syntax as mentioned way above. Everything it perfect under the hood but it just won’t show. Instructions don’t work for my case.
Almas — May 11, 2009
[...] have been any easier to setup. Rather than spend my time walking through how to set it up, just go here and check out his walk through, it works perfectly for [...]
drapergeek » Blog Archive » Macbook Web Server Setup — May 17, 2009
10.5.7 plus omnifocus-1.5-on-iphone-3.0 == works for me + thanks
Ch u ck — July 4, 2009
Great How-To, worked perfectly!
Thanks!
WebDrive — July 19, 2009
[...] Setting up WebDAV on MAC OSX Leopard By jimdreams http://manas.tungare.name/blog/howto-setup-webdav-on-mac-os-x-leopard-for-syncing-omnifocus-to-iphon… [...]
Setting up WebDAV on MAC OSX Leopard « Jimdreams’s Blog — September 2, 2009
Hey guys!
Hopefully someone can help me. I think i might’ve messed up on step 3 (Configure WebDAV). I copied & pasted the entire block over the httpd-dav.conf file. everything else was erased and i did not back up the original file. Is there anything i can do to fix this? i appreciate any help!!
Roxanne — September 4, 2009
Thank you for the great instructions!!
I have my main computer working perfectly. It syncs from OmniFocus desktop to local WebDAV, and syncs over 3G to the WebDAV on my 3Gs iphone. Love it. Thank you.
Problem? I now am attempting to set up the same thing for my girlfriend. I have the desktop syncing to the local WebDAV on her computer (same network but new WebDAV alias name, BTW). But her 3G iPhone will just not sync over 3G network. It (OmniFocus on the iPhone) just loops back to the set up sync screen. I can change the location on her iPhone to point to my WebDAV and it works over the 3G network. I thought maybe it was a port forwarding issue, but I set her computer in DMZ mode to test and it still loops back to set up screen. Any ideas? Thanks in advance.
DStatic — September 6, 2009
@Roxanne – I am happy to send you a copy of mine if it will help. What version OS X you running? I have a few computers, so maybe one of them matches yours.
DStatic — September 7, 2009
I figured out how to get around the two machine situation, I just pointed the second machine to sync to the main WebDAV directory (the one I can connect to without issue) on the main machine. This way I am able to connect both iPhones to both WebDAV directories without any problems. Note: I have the main computer’s OmniFocus pointing to it’s own WebDAV share, and the second computer pointing to it’s own WebDAV share. This fixed my issues.
Thanks again for a wonderful article. It has made me uber happy to have the ability to stay in sync no matter what network I am connected.
DStatic — September 9, 2009
I followed these instructions under 10.5 and got my WebDAV site (http://grumpy.gcsu.edu/webdav/) up and running just fine. However, it ceased to work after upgrading to 10.6. Thinking that the upgrade may have overwritten one or more of the config files, I stepped through all of this once again. No errors or apparent issues but it still isn’t working for me. So now I’m thinking that there is a critical difference between 10.5 and 10.6.
Does anyone have a new recipe, one that works with 10.6?
Frank Lowney — October 21, 2009
Simple thing that you forgot to mention… you need to allow Web Sharing to pass through your firewall. Go to Security PrefPane > Firewall > Set Access for specific services and applications > add WebSharing
brainScan — November 9, 2009
I was able to set up ReadyNAS by setting port 80 to point to my ReadyNAS Duo. Then put in my dynamic DNS domain name and the WebDav subdirectory in for the settings in Omnifocus’ sync settings. Previously, I tried using port 443 for security, but that didn’t work. I hope this helps someone else.
Phil — December 13, 2009
Holy shit it worked! I didn’t even know what WebDAV was good for until this article. I have DynDNS setup for my Daylite database, and for remote wake on LAN through iNet. I thought it would be great to be able to remotely wake my mac from anywhere and sync Daylite and Omnifocus, and now it works!
Awesome. Just Awesome. :)
Aaron — January 22, 2010
Great Tutorial
Thus, being new to MAC (just bought the new IMAC 10.6.2) I cannot find my way through to the files to edit … would it be rude to ask for a little extra kick?
Thanks a lot
Mitch — February 9, 2010
ok, one more time:
shift+apple-key+G
Jakob — March 2, 2010
Worked fine for me on Mac OS X 10.6.3 after adding DavLockDB “/usr/var/DavLock” in the httpd-conf file; can now sync from iPod Touch and iPad with GoodReader
Al Winchester — May 16, 2010
First, thank you Manus Tungare and everyone for a great free resource. SwissDisk offers a FREE https i.e. secure apache/webDAV based server to sync the iPhone, iPAd, and any other handheld device or phone. Many, many SwissDisk free account holders use OmniFocus to sync their calendars and maintain the privacy of their contact list. All connections to SwissDisk are end-to-end encrypted. A link to the http://www.SwissDisk.com help http://www.swissdisk.com/support/how-to/macosx-goliath.html
HonestLogic — June 12, 2010
Excellent article, many thanks. My need for WebDAV was not for OmniFocus, but for allowing the GoodReader app (http://www.goodiware.com/) on an iPad to connect to my Mac Pro for file transfers. Running under OS X 10.6.4, I can report that the above instructions worked perfectly and I now have remote access (over local WiFi) to the my Mac from my iPad.
Reference Comment 163: I have DavLockDB “/usr/var/DavLock” in my httpd-dav.conf file, not in httpd.conf. Works fine.
Roy — June 19, 2010
I am amazed that you wrote this two years ago! Good job! One thing I have been able to get to work that you didn’t in the article was to get Digest Passwords to work with OmniFocus v1.7.5 which is better since the passwords are transmitted securely.
In addition to your instructions, to get Digest Passwords to work I edited conf/httpd.conf I uncommented: LoadModule auth_digest_module modules/mod_auth_digest.so
And then I made sure and used:
AuthType Digest
AuthName OmniFocus-Realm
AuthUserFile “/usr/local/apache2/user.passwd”
AuthDigestProvider file
require user myUser
Then used the password command: htdigest -c /usr/local/apache2/user.passwd OmniFocus-Realm myUser
and it prompts for the password
On my Mac id: root group: daemon are used by the web server so I had to make sure and chown root:daemon
and chmod 770 the directories and chmod 640 files to make sure the web server had access.
Also to test it out you can do: sudo brew install litmus (requires brew and Apple Xcode C Compiler installed) brew is HomeBrew: http://joshkim.org/2010/03/06/homebrew-mac-installation/
Jeffrey Thompson — August 23, 2010
This link shows how to set it up in Digest mode, which encrypts the password. It would be better to make sure that the page is only accessible over HTTPS as well to make sure that the entire content of the page is encrypted instead of just the password. The httpd-dav.conf on the following link needs to be modified with my code below to prevent logging in without a password. I removed the leading less-than signs from the following code so it posts OK on the blog.
Directory “/Library/WebServer/WebDAV”>
Order Allow,Deny
Allow from all
/Directory>
Location /webdav>
Dav On
AuthType Digest
AuthName WebDAV-Realm
AuthUserFile “/usr/webdav.passwd”
require user laptoppc
/Location>
http://geekfactor.charrington.com/2009/12/run-a-webdav-server-on-your-mac-to-sync-voodoopad-for-free
Tyler — September 15, 2010
Hey thanks! This procedure helped me setup a WebDAV server on our iMac to use the new functionality in the iPad iWorks software (Numbers, Pages, and Keynote). It worked great! I can now easily share between the iPad software and the iMac. I can even no go back and forth with the the Mac version of MS Office (since file translation support was also added with the latest update).
Mark Cook — September 25, 2010
I setup WebDAV as described here. Everything works, except for this:
When I use the Finder to copy a hierarchy of folders and subfolders to the WebDAV share, it fails to copy properly. It looks like some permission/directory creation problem.
Anyone else having this problem?
Is this a Finder problem or a WebDAV setup problem on the server?
germ — September 30, 2010
[...] once you enter your credentials. If you’re not a MobileMe member, you’ll need to set up your own WebDAV server. If you don’t know what that means, DON’T ATTEMPT TO DO IT! Go buy MobileMe, and [...]
VoodooPad on the iPad is fantastic | Macgasm — December 31, 2010
My Webdav is setup fine, but after doing DynDNS and port forwarding I’m still unable to connect to Webdav files from outside my network can anyone give me some advice or pointers in the right direction?
Jay — January 18, 2011
Thanks for providing this clear, concise and accurate set of instructions.
Keith — February 13, 2011
Thank you very much. Really great tutorial to follow, even for a complete amateur. That was my first venture into the terminal…
Marc — March 22, 2011
[...] View original post here: HOWTO Setup WebDAV on Mac OS X – Manas Tungare [...]
HOWTO Setup WebDAV on Mac OS X – Manas Tungare | MacLicious.com — March 24, 2011
To All having problems outside of your local LAN, make sure your ISP (internet service provider) doesn’t block port 80. mOst of the “home” ISP (Cablevision, etc) do block them in order to prevent you from running a web server from your house and not paying the “premium” commercial fees.
Hope this helps.
JJ — April 21, 2011
The Apache/WebDAV combination is difficult to setup for non technical users. For example, you have to make sure the server is secure, that you have your users configured correctly etc, all by using hard to understand configuration files.
I suggest that all non technical users take a look at BarracudaDrive, which eliminates the technical hurdles in the above tutorial.
http://barracudaserver.com/products/BarracudaDrive/
BarracudaDrive also includes automatic port forwarding logic and integrated DDNS clients.
Stilman — May 1, 2011
I tried to add a WebDAV share for /Library/WebServer/Documents (or whatever the webroot is), but everything got a password, even when accessed outside of WebDAV. How would I go about fixing this?
Tristan Seifert — May 8, 2011
Thanks for this very useful HOWTO !
It worked very fine on my MacBook Pro to share files with my iPad easily without having to sync it.
I would like to add a second User so I don’t have to share my password, could you perhaps help me do that ?
Martin — May 10, 2011
Martin: It’s rather easy, actually. Just run the step to generate the passwords twice. That should work, methinks!
Tristan Seifert — May 10, 2011
Great instructions! Clear and simple, up and running in 2 minutes!
xo!
Dave Curado — May 14, 2011
Hi Manas, thanks for this tutorial. I managed to get it working if my alias points to /Library/WebServer/WebDAV but if I point the alias elsewhere, e.g. /Users/MyUsername/Documents/Dropbox I get this message:
There was an error connecting to the server “192.168.1.100”. Check the server name or IP address, and then try again. If you are unable to resolve the problem contact your system administrator.
Any idea why?
David Wang — May 24, 2011
I seem to be having problems. I’ve followed the instructions within this document. sudo apachectl -t
yields Syntax OK. But when I put in http://webdavsubdomain.mywebsiteaddress.com (which is set up to forward to http://myusername.dyndns-ip.com) to my iPhone, I get the message Unable to sync database with server: could not connect to server. I’ve set up port forwarding in my router to send requests to port 80 to the same port on my computer at 192.168.2.5. Perhaps this is wrong. Any ideas?
Mark — May 26, 2011
Using Mac OS Snow Leopard 10.6.7, I experienced similar problems like a few people here. I had a look into the error_log of the Apache server (/private/var/log/apache2/error_log) and I saw that every time I tried to login there was this error message:
A lock database was not specified with the DAVLockDB directive. One must be specified to use the locking functionality.
So, I created a folder for the DAVLockDB with a file for the database in it. Afterwards I adjusted the permissions:
sudo mkdir -p /Library/WebServer/DAVLockDB
sudo touch /Library/WebServer/DAVLockDB/DAVLockDB
sudo chown -R www:www /Library/WebServer/DAVLockDB
sudo chown -R www:www /Library/WebServer/DAVLockDB/DAVLockDB
And after that, I adjusted the httpd-dav.conf file:
DAVLockDB “/Library/WebServer/DAVLockDB/DAVLockDB”
Alias /webdav “/Library/WebServer/WebDAV”
Dav On
Order Allow,Deny
Allow from all
AuthType Basic
AuthName WebDAV-Realm
AuthUserFile “/usr/var/webdav.passwd”
Robin — May 31, 2011
The comment function of this page removed the tags from my last comment. This is maybe better:
DAVLockDB “/Library/WebServer/DAVLockDB/DAVLockDB”
Alias /webdav “/Library/WebServer/WebDAV”
Directory “/Library/WebServer/WebDAV” >
Dav On
Order Allow,Deny
Allow from all
AuthType Basic
AuthName WebDAV-Realm
AuthUserFile “/usr/var/webdav.passwd”
/Directory>
Robin — May 31, 2011
Thanks a lot! It works perfect for me. This is exactly what I needed
Manish — June 5, 2011
I have tried several parameters in the directory as Donovan (57) suggested. It works well for me.
Alias /webdav “/Library/WebServer/WebDAV”
Dav On
Options +Indexes
IndexOptions FancyIndexing
Order Allow,Deny
Allow from all
AuthType Basic
AuthName WebDAV-Realm
AuthUserFile “/usr/webdav.passwd”
require valid-user
viroteb — June 7, 2011
First of all, thanks for the excellent tutorial.
It works OK for me, now I can access to my Mac from both iPad and iPhone (and of course from my MacBook). I’ve tried several apps including OmniFocus, OmniOutliner, PDF Expert, JotNot, GoodReader… All of then connect to the WebDAV server without trouble, both in read and write mode.
There’s a problem, however. I can’t access from iOS iWork apps anyway. As for the other apps, I enter the URL (http://www.mywebdavserver.com/webdav/), username and paswword, press on Start session, the word “Verifying” appears at the top of the screen and then I can wait even hours. It happens nothing.
I have tried every different combinations of quotes, slashes in httpd-dav.conf.
The problem goes on silently, no entries in apache_error_log. And it doesn’t appear to be an authentication problem since it happens trying to connect to the WebDAV server, even without entering username and password.
Any ideas?
Carlosinter — June 12, 2011
Thanks for this post. I recently purchased an ipad and found that iwork won’t support Drop Box and I refused to have to rely on itunes just to move files back and forth between my pc and my ipad, so both devices could work on them. I read a bit on webdav and decided to give it a try. Your instructions were easy to follow and it worked for me in the first try. Took me about 10 minutes to set it all up. Not hard at all. Of course this wan’t designed for security or anything like that however it allows me to move files back and forth among my devices. I copy it to my webdav share and then if I want, move it to my dropbox folder. Perfect solution. Thanks.
John T — October 19, 2011
Awesome and crystal clear instructions. I was interested in setting up a WebDav server to use with my Nokia N8. These instructions also worked flawlessly on Snow Leopard so I can send big files to my Mac from Symbian phone (Nokia N8) over Wifi. To other N8 users remember to change the defauly address in Remote Drive setup from https to:
http://your-local-ip-here/your-fancy-webdav-share
I”m sure that if you port forward and get the “outside world” IP of your router’s ISP you could keep sending stuff via the internet, but not tried this yet.
Adrian T — October 27, 2011
[...] I remembered the conversation and decided to look into it. My Google search returned two tutorials. One assumed I knew more than I did. The other one was detailed enough for me, so off I went into [...]
Tech Salad » iPads and WebDAV — December 15, 2011
[...] http://manas.tungare.name/blog/howto-setup-webdav-on-mac-os-x/ Share this:TwitterFacebookEmailPrintLike this:LikeBe the first to like this post. [...]
WebDAV? « Scratch Pad — January 11, 2012
This is a great article. I setup WebDAV on Apache before, overall, it was quite hard. This article should be very good for people with some IT background, otherwise, now I would recommend cloud hosted webdav solution such as the service offered by http://www.DriveHQ.com. The nice thing with cloud based service is you just need to sign up an account, and your webdav server is ready, and it is accessible from anywhere. (not limited to the intranet)
Brian1999 — August 19, 2012
I’m on Mac OS X using the built-in WebDAV in the file browser. I get error code -50 when I try to copy/delete. I’ve tried all vatiorians of URLs to no avail. Is there any kind of configuration that needs to be done to WebDAV to make it all work?I’ve also tried WebDAV clients on Windows XP. No luck there either.
Moji — August 22, 2012
I know this post is years old, but… how can i set my /webdav alias to open access, no user account? I’m getting “Forbidden” and would like to troubleshoot problem to see if everything else works first.
Jeff B — November 6, 2012
Thanks Manas, everything seems to be working perfectly. I am using Mountain Lion OS. I now want to set access control with group membership.
Can you tell how to do this?
Thanks!!
Gary Stephens — March 6, 2013