Apple has been consistently phasing out Server related apps and services. Some of them have been moved around to macOS, while the others are either killed off or been moved as an embedded feature. WebDAV was one of them. If you are so inclined, macOS can now handle WebDAV hosting without the Server app from Apple. But be warned, no GUI support.
Now here is some background. wfsctl is easy to use. You link some folders to share and start the service. Done. Quite the Apple’s work, except it comes with caveats; it works only over bonjour or mDNS. In other words, it will let you connect to
mymac.local but not to
192.168.1.2, which would be the static IP of the said Mac. Bonjour requires multicast over network, which can be often unavailable. (e.g. VPN) You could, in theory, setup a rock hard home network, especially with a Raspberry machine costs less than 100 bucks. But, if you still want to use simple static IP addresses, wfsctl won’t do any justice.
The reason why it takes Bonjour, from what I can read from the logs, is because using Bonjour screws the path finding in Apache. By design or not, only when you are connected via Bonjour wfsctl configuration takes over, giving you access to directories and files. Otherwise, Apple’s other modules interprets the path, giving you only directories but not the actual files with a missing file error. Something is amiss.
The solution is rather simple:
- Open up terminal.
- Run the following commands per shares you have registered via wfsctl:
ln -s [path to target] /Library/WebServer/Documents
- Restart the wfsctl with following commands:
sudo wfsctl stop sudo apachectl restart sudo wfsctl start
This will create a symbolic link to the target within the root folder for WebDAV, much like we create an alias or shortcuts on PCs for personal usage. You could, also, create an Apache alias within the configuration.
The reason why I chose to go otherwise is simple. They are automatically generated and dynamically controlled behind the scenes. And the purpose of wfsctl practice is easy control, not an actual Apache setup. There is no guarantee configurations will stay the same, either in your hand or in some other developer’s hand. You could however, optionally, alter the DocumentRoot of httpd, which is set as
/Library/Webserver/Documents as default. The configuration is saved in
But ultimately, Apple seems to show little to no interest in Server side products and softwares, despite the fact that Files App for iOS will support WebDAV in coming iOS 13. I hope Apple to release a complementary app or services available for Macs, so that iPad can be used side-by-side without hiccups as Apple advertises.
I am eager to hear other people’s input on this, as I was quite shocked to find out wfsctl didn’t work out of the box. I will be looking forward to other WebDAV solutions for homes and small businesses as well.