2

我正在尝试在 CentOS 6.3 服务器上设置 webdav。它适用于http,但不适用于https。

我安装了以下img:

httpd-2.2.15-15.el6.centos.1.i686
davfs2-1.4.6-1.el6.rf.i686
cadaver-0.23.3-1.el6.i386
litmus-0.12.1-3.el6.i686
on CentOS 6.3

我的 apache https 配置是:

<VirtualHost _default_:443>
SSLProtocol all -SSLv2
SSLHonorCipherOrder On
SSLCipherSuite RC4-SHA:HIGH:!ADH
SSLCertificateFile  /etc/pki/tls/certs/ssl.pem
SSLCertificateKeyFile  /etc/pki/tls/certs/ssl.key
SSLCertificateChainFile  /etc/pki/tls/certs/Class-1-Intermediate-Server-CA.ca.pem
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>

Alias /webdav1953  "/var/www/WEBDAV"
<Location /webdav1953>
   DAV on
   Options +Indexes
   AddDefaultCharset UTF-8
   SSLRequireSSL
   AuthType Basic
   AuthName "WebDAV"
   AuthUserFile /var/www/passwd/webdav_basic
   Options +Indexes
   IndexOptions FancyIndexing
   Satisfy all
   Order allow,deny
   Require valid-user
   Allow from 192.168.0.0/16 169.254.128.201 127.0.0.1
   Require user greg
</Location>
</VirtualHost>

如果我使用 cadaver 通过 https 访问 /webdav1953,它会失败并显示:

Could not access /webdav1953/ (not WebDAV-enabled?):
Could not read chunk size: connection was closed by server
Connection to `amarone.kyriacou.eu' closed.
dav:!>

我可以打开到 /webdav1953 的 https 连接,而不会出现错误或警告消息(如果我在“位置 /webdav1953”中有“Dav On”,我应该能够做到这一点)。我使用 StartCom Ltd 的 SSL 证书问题。

我在“VirtualHost默认值:443”之外有一个类似的 webdav 定义,我可以使用 cadaver 访问它,并且 litmus 没有错误。

当我对 /webdav1953(通过 https)运行石蕊试纸时,所有测试都成功并发出一个警告:

5. copy_nodestcoll....... WARNING: COPY to non-existant collection '/webdav1953/litmus/nonesuch' gave '500 Internal Server Error' not 409 (RFC2518:S8.8.5)

直到:

5. propinit.............. pass
6. propset............... FAIL (PROPPATCH on `/webdav1953/litmus/prop': Could not read chunk size: connection was closed by server)
7. propget............... SKIPPED
8. propextended.......... FAIL (PROPFIND on `/webdav1953/litmus/prop': Could not read chunk size: connection was closed by server)
9. propmove.............. SKIPPED

查看 debug.log 中的测试“6.propset”:

 ******* Running test 6: propset ********
 ah_create, for WWW-Authenticate
 Running pre_send hooks
 auth: Sending 'Basic' response
 Sending request headers:
 PROPPATCH /webdav1953/litmus/prop HTTP/1.1^M
 User-Agent: litmus/0.12.1 neon/0.29.3^M
 Connection: TE^M
 TE: trailers^M
 Host: amarone.kyriacou.eu^M
 Content-Length: 1033^M
 Content-Type: application/xml^M
 Authorization: Basic Z2VvcmdlOmZyZWQxN2F2cmlv^M
 X-Litmus: props: 6 (propset)^M
 ^M
 Sending request-line and headers:
 Sending request body:
 Body block (1033 bytes):
 [<?xml version="1.0" encoding="utf-8" ?>
 <D:propertyupdate xmlns:D="DAV:"><D:set><D:prop><prop0 xmlns="http://example.com/neon/litmus/">value0</prop0></D:prop></D:set>
 <D:set><D:prop><prop1 xmlns="http://example.com/neon/litmus/">value1</prop1></D:prop></D:set>
 <D:set><D:prop><prop2 xmlns="http://example.com/neon/litmus/">value2</prop2></D:prop></D:set>
 <D:set><D:prop><prop3 xmlns="http://example.com/neon/litmus/">value3</prop3></D:prop></D:set>
 <D:set><D:prop><prop4 xmlns="http://example.com/neon/litmus/">value4</prop4></D:prop></D:set>
 <D:set><D:prop><prop5 xmlns="http://example.com/neon/litmus/">value5</prop5></D:prop></D:set>
 <D:set><D:prop><prop6 xmlns="http://example.com/neon/litmus/">value6</prop6></D:prop></D:set>
 <D:set><D:prop><prop7 xmlns="http://example.com/neon/litmus/">value7</prop7></D:prop></D:set>
 <D:set><D:prop><prop8 xmlns="http://example.com/neon/litmus/">value8</prop8></D:prop></D:set>
 <D:set><D:prop><prop9 xmlns="http://example.com/neon/litmus/">value9</prop9></D:prop></D:set>
 </D:propertyupdate>
 ]
 Request sent; retry is 1.
 [status-line] < HTTP/1.1 207 Multi-Status^M
 [hdr] Date: Wed, 24 Oct 2012 22:39:05 GMT^M
 Header Name: [date], Value: [Wed, 24 Oct 2012 22:39:05 GMT]
 [hdr] Server: Apache^M
 Header Name: [server], Value: [Apache]
 [hdr] Transfer-Encoding: chunked^M
 Header Name: [transfer-encoding], Value: [chunked]
 [hdr] Content-Type: text/xml; charset="utf-8";charset=utf-8^M
 Header Name: [content-type], Value: [text/xml; charset="utf-8";charset=utf-8]
 [hdr] ^M
 End of headers.
 Running post_headers hooks
 [chunk] < 1b7^M
 Got chunk size: 439
 Reading 439 bytes of response body.
 Got 439 bytes.
 Read block (439 bytes):
 [<?xml version="1.0" encoding="utf-8"?>
 <D:multistatus xmlns:D="DAV:" xmlns:ns1="http://example.com/neon/litmus/" xmlns:ns0="DAV:">
 <D:response>
 <D:href>/webdav1953/litmus/prop</D:href>
 <D:propstat>
 <D:prop>
 <ns1:prop0/>^M
 <ns1:prop1/>^M
 <ns1:prop2/>^M
 <ns1:prop3/>^M
 <ns1:prop4/>^M
 <ns1:prop5/>^M
 <ns1:prop6/>^M
 <ns1:prop7/>^M
 <ns1:prop8/>^M
 <ns1:prop9/>^M
 </D:prop>
 <D:status>HTTP/1.1 200 OK</D:status>
 </D:propstat>
 </D:response>
 </D:multistatus>
 ]
 XML: Parsing 439 bytes.
 XML: start-element (0, {DAV:, multistatus}) => 1
 XML: char-data (1) returns 0
 XML: start-element (1, {DAV:, response}) => 2
 XML: char-data (2) returns 0
 XML: start-element (2, {DAV:, href}) => 4
 XML: char-data (4) returns 0
 XML: end-element (4, {DAV:, href})
 XML: char-data (2) returns 0
 XML: start-element (2, {DAV:, propstat}) => 7
 XML: char-data (7) returns 0
 XML: start-element (7, {DAV:, prop}) => 50
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop0}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop0})
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop1}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop1})
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop2}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop2})
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop3}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop3})
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop4}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop4})
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop5}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop5})
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop6}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop6})
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop7}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop7})
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop8}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop8})
 XML: char-data (50) returns 0
 XML: start-element (50, {http://example.com/neon/litmus/, prop9}) => 0
 XML: end-element (0, {http://example.com/neon/litmus/, prop9})
 XML: char-data (50) returns 0
 XML: end-element (50, {DAV:, prop})
 XML: char-data (7) returns 0
 XML: start-element (7, {DAV:, status}) => 6
 XML: char-data (6) returns 0
 Decoded status line: HTTP/1.1 200 OK
 XML: end-element (6, {DAV:, status})
 XML: char-data (7) returns 0
 XML: end-element (7, {DAV:, propstat})
 XML: char-data (2) returns 0
 XML: end-element (2, {DAV:, response})
 XML: char-data (1) returns 0
 XML: end-element (1, {DAV:, multistatus})
 XML: XML_Parse returned 1
 Aborted request (-3): Could not read chunk size
 sess: Closing connection.
 sess: Connection closed.
 Request ends, status 207 class 2xx, error line:
 Could not read chunk size: connection was closed by server
 Running destroy hooks.
 Request ends.:

任何解决此问题的帮助都将受到欢迎。

4

1 回答 1

0

I don't see a SSLEngine On. It defaults to Off ... so I would expect that.

BTW: I wouldn't use Basic authentication. Perhaps you can try at least digest auth.

于 2012-11-08T12:04:43.107 回答