Включение WebDAV в Apache


  1. Log into your server as root using SSH. Make sure that mod_dav is enabled on your server. The DV server should have this enabled by default. After running this command, make sure that the LoadModule does not start with a #. The # means that the module is commented out. If necessary, remove the # and restart httpd:
    grep "LoadModule dav_" /etc/httpd/conf/httpd.conf
  2. Now, check the WebDAV section in the same httpd.conf file. The location for the DAV lock database must be specified in the global section of your httpd.conf file using the DavLockDB directive. The directory containing the lock database file must be writable by the User and Group under which Apache is running. You should see the following lines in that same file:
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
  3. Next, we need to create a vhost.conf file, or add to your existing one, that will need to be saved in the/var/www/vhosts/example.com/conf directory. Change the first line accordingly. For this article, we will be using a directory named Dav:
    <Directory /var/www/vhosts/example.com/httpdocs/Dav >
    Dav On
    AllowOverride none
  4. For WebDAV to work properly, we will also need to change ownership of the Dav directory to the Apache user:
    chown -R apache /var/www/vhosts/example.com/httpdocs/Dav
  5. Reconfigure your webserver so it will look for your new vhost.conf file by running the following commmand:
    /usr/local/psa/admin/sbin/httpdmng --reconfigure-server

You should now be able to connect using any WebDAV client! Remember that you need to authenticate using the credentials you configured in Plesk for your directory.

Enabling WebDAV.

Leave a Reply

Your email address will not be published. Required fields are marked *