我正在尝试在我的 centos 8 上设置一个 webdav 服务器,并且在过去的几个小时里被一条"client denied by server configuration: /srv/webdav/fs"
消息卡住了。我已经阅读了几个发生此错误的线程,但没有一个可以帮助我找出问题所在。
这是我的配置文件:
DavLockDB "/etc/httpd/var/davlock"
<VirtualHost *:443>
ServerName example.com
ServerAdmin example@mail
DocumentRoot /srv/webdav
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
Alias /fs /srv/webdav/fs
<Directory /fs>
AuthType "Basic"
AuthName "Password Manager"
AuthBasicProvider file
AuthUserFile "/etc/httpd/conf/dav_passwords"
Require valid-user
DAV On
Options Indexes
</Directory>
</VirtualHost>
我创建了一个用户sudo htpasswd -c /etc/httpd/conf/dav_passwords john
。
/srv/webdav
归 apache:apache 所有。
非常感谢您的帮助。提前致谢!
编辑:
我将日志级别更改为 trace3 并在错误文件中获得了一些更详细的日志。我仍然看不出问题出在哪里:
[Thu May 13 08:11:02.888221 2021] [ssl:trace3] [pid 3464:tid 140514974116160] ssl_engine_init.c(607): Using OpenSSL/system default SSL/TLS protocols
[Thu May 13 08:11:02.888225 2021] [ssl:trace3] [pid 3464:tid 140514974116160] ssl_engine_init.c(628): Creating new SSL context (protocols: default)
[Thu May 13 08:11:02.888535 2021] [ssl:trace1] [pid 3464:tid 140514974116160] ssl_engine_init.c(972): Configuring permitted SSL ciphers [ALL:!COMPLEMENTOFDEFAULT:!eNULL:!aNULL:!eNULL:!EXP]
[Thu May 13 08:11:02.888590 2021] [ssl:debug] [pid 3464:tid 140514974116160] ssl_engine_init.c(520): AH01893: Configuring TLS extension handling
[Thu May 13 08:11:02.888795 2021] [ssl:warn] [pid 3464:tid 140514974116160] AH01906: example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu May 13 08:11:02.888809 2021] [ssl:trace3] [pid 3464:tid 140514974116160] ssl_util_ssl.c(433): [example.com:443] modssl_X509_match_name: expecting name 'example.com', matched by ID 'example.com'
[Thu May 13 08:11:02.888840 2021] [ssl:debug] [pid 3464:tid 140514974116160] ssl_util_ssl.c(444): AH02412: [example.com:443] Cert matches for name 'example.com' [subject: emailAddress=example@mail,CN=example.com / issuer: emailAddress=example@mail,CN=example.com / serial: 7C1166CC353EC7F29C68B66269042224CEE41E67 / notbefore: May 12 08:52:52 2021 GMT / notafter: May 12 08:52:52 2022 GMT]
[Thu May 13 08:11:02.888846 2021] [ssl:info] [pid 3464:tid 140514974116160] AH02568: Certificate and private key example.com:443:0 configured from /etc/ssl/certs/apache-selfsigned.crt and /etc/ssl/private/apache-selfsigned.key