WebDAV

WebDAV applications expose a directory’s contents (including subdirectories) to a controlled set of users over HTTP.

There are two kinds of WebDAV applications available through the WebFaction control panel: a standard WebDAV application and a symlink application. The standard application creates a directory in your ~/webapps directory. The symlink application does not create its own directory; instead, you must provide the path to an existing directory in the application installer’s Extra info field.

Standard and symlink WebDAV applications can only be accessed with a valid username and password. Valid usernames and passwords are stored in a .htpasswd file in the WebDAV application’s directory (if the file doesn’t already exist, the installer creates one automatically).

Note

WebDAV applications use HTTP basic access authentication. Basic access authentication is unsupported natively by Windows 7. To use a WebDAV application with Windows 7, use a stand-alone WebDAV client such as Cyberduck.

Warning

WebDAV applications can only be mounted on the root URL path of a domain (/). We recommend that you create a new subdomain for use with your WebDAV applications.

Creating a WebDAV Application

To create a WebDAV application:

  1. Create the WebDAV application.

    1. Log in to the control panel.

    2. Click Domains / websites ‣ Applications. The list of applications appears.

    3. Click the Add new application button. The Create a new application form appears.

    4. In the Name field, enter a name for the application.

    5. In the App Category menu, click to select WebDav.

    6. Choose the type of WebDAV application to create.

      If you want to serve the contents of a new directory in your ~/webapps directory, click to select WebDav.

      If you want to serve the contents of an existing directory, click to select WebDav Symlink.

    7. If applicable, in the Machine menu, click to select a web server.

    8. If you selected WebDav Symlink, then enter the full path to the existing directory in the Extra info field.

      For example, if you want to serve ~/webdav, then enter /home/username/webdav in the Extra info field.

      Warning

      If you do not enter a valid path in the Extra info field, you must delete the application, then create a new application with a valid path.

      If you selected a standard WebDAV application, then continue to the next step.

    9. Click the Save button. The application is installed and added to the list of applications.

  2. Add usernames and passwords.

Don’t forget to add the WebDAV application to a new or existing website to make the application available on the web.

Adding and Removing WebDAV Users

Use the htpasswd utility to add or remove WebDAV users.

Adding Users

To add a WebDAV user:

  1. Open an SSH session to your account.

  2. Switch to the WebDAV directory. Enter cd webdav, where webdav is the path to the WebDAV directory, and press Enter.

    For example, if you installed a standard WebDAV application, then enter cd $HOME/webapps/appname, where appname is the name of the application as it appears on the control panel, and press Enter.

  3. Enter htpasswd .htpasswd user, where user is the new username, and press Enter. A prompt appears to enter the password.

  4. Enter a password and press Enter. A prompt appears to reenter the password.

    See also

    See Strengthening Passwords for important information about choosing passwords.

  5. Reenter the password and press Enter.

The user is added.

Removing Users

To remove a WebDAV user:

  1. Open an SSH session to your account.

  2. Switch to the WebDAV directory. Enter cd webdav, where webdav is the path to the WebDAV directory, and press Enter.

    For example, if you installed a standard WebDAV application, then enter cd $HOME/webapps/appname, where appname is the name of the application as it appears on the control panel, and press Enter.

  3. Enter htpasswd -D .htpasswd user, where user is the username to be deleted, and press Enter. A confirmation message appears.