0

Apache 2.4.29 \ Ubuntu 18.04 LTE

The webdav was working fine before I was using an SSL connection, that is, when I was using a "http://" URL to access the folders in my server (which is pc with ubuntu running apache). I was using cadaver to check if I could make files in the directory where webdav is enabled.

But as soon I enabled the SSL connection with the help of a self-signed certificate, I was able to establish a connection with the help of a "https://" URL, but could not write anything in the directory because of a 405 error. here is what it looks like

My config file looks like this

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



    SSLEngine on
    SSLProxyEngine on
    SSLCertificateFile /etc/ssl/certs/server.crt
    SSLCertificateKeyFile /etc/ssl/private/server.key



    <Directory /var/www/>
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    Alias /webdav /webdav

    <Location /webdav>
        Options Indexes
        DAV On
        <Limit GET PROPFIND POST OPTIONS MKCOL PUT DELETE LOCK UNLOCK COPY MOVE PROPPATCH>
        AuthType Basic
        AuthName "webdav"
        AuthUserFile /etc/apache2/users.password
        Require valid-user
        </Limit>
    </Location>

</VirtualHost>

I would like to enable webdav over a SSL connection because some devices have disabled 'http://' and the connection and require a 'https://' connection to work. Thanks in advance.

0

I figured it out. Apparently Apache2 has two different config files for pointing out the available sites. By default those files are '000-default.conf' for http:// connection and 'default-ssl.conf' for https:// enabled connection. I had to write configuration for webdav on the file 'default-ssl.conf' for the webdav to work with https:// url.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.