Apache httpd, WebDAV 및 다양한 설정

Apache httpd, WebDAV 및 다양한 설정

/var/www/dental-atelier.ch/두 가지 다른 방법으로 액세스하려는 디렉토리( )가 있습니다 .

일반 웹페이지처럼

<VirtualHost 78.47.122.114:80> 

    ServerAdmin [email protected] 
    DocumentRoot /var/www/dental-atelier.ch 

    <Location /> 
       Options +Includes 
    </Location> 

    ServerName dental-atelier.ch 
    ServerAlias dental-atelier.ch www.dental-atelier.ch 
    ErrorLog logs/dental-atelier.ch-error_log 
    CustomLog logs/dental-atelier.ch-access_log combined 

</VirtualHost> 

한 번은 WebDav를 사용했지만 이번에는 SSL을 사용했습니다.

<VirtualHost _default_:443>

    DocumentRoot "/var/www/html"

    # Use separate log files for the SSL virtual host; note that LogLevel
    # is not inherited from httpd.conf.
    ErrorLog logs/ssl_error_log
    TransferLog logs/ssl_access_log
    LogLevel warn

    <Directory /var/www/html>
        Options +Includes
    </Directory>

    Alias /webdav /var/www/webdav

    <Directory /var/www/webdav/dental-atelier.ch/> 
        AuthType Basic 
        AuthName "Password Required" 
        AuthUserFile /etc/shadow 
        Require user user 
        DAV On 
        Options Indexes FollowSymLinks 
    </Directory> 

</VirtualHost>

이는 httpd 2.2에서는 문제가 되지 않습니다.

2.4로 업그레이드한 후 httpd는 동일한 디렉토리에 대해 두 설정을 모두 허용하지 않습니다. 첫 번째는 (첫 번째 가상 호스트와 함께) 단독으로 작동하고, 두 번째는 두 번째 가상 호스트와 단독으로 작동합니다. 둘 다 구성하면

$ cadaver https://78.47.122.114/webdav/dental-atelier.ch
WARNING: Untrusted server certificate presented for `ip1.corti.li':
Certificate was issued to hostname `ip1.corti.li' rather than `78.47.122.114'
This connection could have been intercepted.
Issued to: ip1.corti.li
Issued by: http://www.CAcert.org, CAcert Inc.
Certificate is valid from Thu, 10 Apr 2014 10:43:34 GMT to Sat, 09 Apr 2016 10:43:34 GMT
Do you wish to accept the certificate? (y/n) y
Authentication required for Password Required on server `78.47.122.114':
Username: user
Password: 
Could not access /webdav/dental-atelier.ch/ (not WebDAV-enabled?):
405 Method Not Allowed
Connection to `78.47.122.114' closed.
dav:!> 

편집을 위해 WebDAV를 통해서도 HTTP 공유 디렉터리를 사용할 수 있게 만드는 방법에 대한 아이디어가 있습니까?

SSL 가상 호스트 로그에는 IncludesSSL이 아닌 가상 호스트(포트 80)에 지정된 지시문과 관련된 오류가 표시됩니다.

ssl_access 로그:

129.132.179.107 - - [19/Feb/2015:15:40:29 +0100] "OPTIONS /webdav/dental-atelier.ch/ HTTP/1.1" 401 381
129.132.179.107 - user [19/Feb/2015:15:40:34 +0100] "OPTIONS /webdav/dental-atelier.ch/ HTTP/1.1" 200 -
129.132.179.107 - user [19/Feb/2015:15:40:34 +0100] "PROPFIND /webdav/dental-atelier.ch/ HTTP/1.1" 405 261

SSL_error_log:

[Thu Feb 19 15:40:34.556872 2015] [include:warn] [pid 29499] [client 129.132.179.107:65259] AH01374: mod_include: Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed: /webdav/dental-atelier.ch/index.html
[Thu Feb 19 15:40:34.557949 2015] [include:warn] [pid 29499] [client 129.132.179.107:65259] AH01374: mod_include: Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed: /webdav/dental-atelier.ch/index.html

편집하다

문제는 실제로 두 개의 서로 다른 가상 호스트에서 동일한 디렉터리를 서로 다른 방식으로 사용하는 것과 관련이 있습니다. 동일한 디렉터리를 복사하고 /var/www/webdav/test해당 test디렉터리를 사용하여 SSL 가상 호스트를 구성하면 모든 것이 매우 원활하게 진행됩니다.

동일한 디렉터리에서 HTTP 가상 호스트를 삭제하는 경우에도 마찬가지입니다.

둘 다에 동일한 데이터가 있으면 Apache httpd는 어떻게든 이를 감지합니다. 2.2에서는 그렇지 않습니다.

답변1

실제로 문제는 다릅니다. 디렉토리에 index.html파일이 포함되어 있고 Apache httpd가 자동으로 이를 전달합니다.

환경

DirectoryIndex disabled 

문제를 해결했습니다.

관련 정보