I'm having the problem of double authentification on my Apache server like he has: Properly Force SSL with .htaccess But I want to do this via the conf files. He says he knows how to do it via conf files, but didnt explain further. I have two config files, both are activated.

<VirtualHost *:80>

Redirect permanent / https://example.com/

ServerName example.com
ServerAlias www.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/example.com/

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


DavLockDB /var/www/DavLock
<VirtualHost *:443>

Alias /webdav /var/www/webdav
<Directory /var/www/webdav>
    DAV On
    AuthType Digest
    AuthName "My File Storage"
    AuthUserFile /etc/apache2/users.password
    Require valid-user

ServerName example.com
DocumentRoot /var/www/example.com/

SSLEngine on
SSLCertificateFile      /etc/letsencrypt/live/example.com/cert.pem
SSLCertificateKeyFile   /etc/letsencrypt/live/example.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem

What am I doing wrong, why do I get double webdav-Window when connecting to http://example.com/webdav?

The authentification window is even telling me that https:// example.com is asking for username and password.

WebDAV Authentification Window

I had an rewrite from www to non-www and http to https working via conf files, but I am not sure what happened to my confs and why it is broken now. All I did was a2enmod a new site and then a2dismod the same site afterwards...

1 Answer 1


It works again. After I did a full restore to one day before I enabled and disabled a site, it now works again. Don't ask me why...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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