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 admin@example.com
DocumentRoot /var/www/example.com/

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

_

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

#Webdav
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
</Directory>

#SSL
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...

up vote 1 down vote accepted

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

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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