Search code examples
phphtml.htaccesswebdavplesk

Enable WebDAV in htaccess


Is it possible to enable WebDAV within an .htaccess file?

My problem is Plesk. It doesn't parse in my changed config files with the enabled WebDAV.

So, is it possible to enable WebDAV out of an .htaccess file?


Solution

  • You can use the Location container and the DAV On directive to enable it, provided that mod_dav is installed on your server:

    <Location /public/webdav/>
        DAV On
        php_admin_flag engine off
        AllowOverride All
        Allow from all
        Options +Indexes
    </Location>
    

    I suggest that you also incorporate password protection using mod_auth.

    PS: If the Location container does not work for you, try using Directory instead.