Skip to content

Instantly share code, notes, and snippets.

@leechristensen
Last active December 14, 2016 01:51
Show Gist options
  • Save leechristensen/1206fdcc329929555f9b04aef73f0cda to your computer and use it in GitHub Desktop.
Save leechristensen/1206fdcc329929555f9b04aef73f0cda to your computer and use it in GitHub Desktop.

1) Enable WebDAV

sudo a2enmod dav
sudo a2enmod dav_fs

mkdir -p /var/www/webdav
touch /var/www/DavLock
chown www-data:www-data /var/www/webdav /var/www/DavLock

2) vim /etc/apache2/sites-available/000-default.conf

DavLockDB /var/www/DavLock

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        Alias /webdav /var/www/webdav

        <Directory /var/www/webdav>
            DAV On
            <LimitExcept GET HEAD OPTIONS PROPFIND>
                deny from all
            </LimitExcept>
        </Directory>
</VirtualHost>

3) Then add your payload to /var/www/webdav/

4) Access share at \\webdav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment