WEBDAV will nicht


#1

Schritte zum Reproduzieren
1.OC auf dem Raspberry Pi 3 mit nginx, mysql und php7 installiert
2.rm /etc/nginx/sites-available/default
nano /etc/nginx/sites-available/default
3.upstream php-handler {
server 127.0.0.1:9000;
#server unix:/var/run/php7.0-fpm.sock;
}

server {
listen 80;
server_name 192.168.1.24;
# enforce https
return 301 https://$server_name$request_uri;
}

server {
listen 443 ssl http2;
server_name 192.168.1.24;

ssl on;
ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/cert.key;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this topic first;
add_header Cache-Control "public, max-age=7200";
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
# Not using TLSv1 will break:
#	Android <= 4.4.40
#	IE <= 10
#	IE mobile <=10
# Removing TLSv1.1 breaks nothing else!
ssl_protocols TLSv1.2;
# Path to the root of your installation
root /OC/owncloud/;
client_max_body_size 4G; # set max upload size
client_header_buffer_size 64k;
large_client_header_buffers 4 64k;
fastcgi_buffers 64 4K;
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
index index.php;
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;
location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
}
location / {
# The following 2 rules are only needed with webfinger
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;

rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
rewrite ^ /index.php$uri;
try_files $uri $uri/ index.php;
}
location = /.well-known/carddav {
    return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
    return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/acme-challenge { }
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
    return 404;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
    return 404;
}
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param HTTPS on;
    fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
    fastcgi_param front_controller_active true;
    fastcgi_pass php-handler;
    fastcgi_intercept_errors on;
    fastcgi_request_buffering off; #Available since nginx 1.7.11
}
location ~ ^/(?:updater|ocs-provider)(?:$|/) {
    try_files $uri $uri/ =404;
    index index.php;
}
# Adding the cache control header for js and css files
# Make sure it is BELOW the PHP block
location ~* \.(?:css|js)$ {
    try_files $uri /index.php$uri$is_args$args;
    add_header Cache-Control "public, max-age=7200";
    # Add headers to serve security related headers (It is intended to have those duplicated to the ones above)
    # Before enabling Strict-Transport-Security headers please read into this topic first.
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
    add_header X-Content-Type-Options nosniff;
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;
    # Optional: Don't log access to assets
    #access_log off;
}
 location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
deny all;
}
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
#fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;

}
location ^~ /data {
internal;
alias /Server/owncloud-data;
}
location ~ ^(.+?.php)(/.*)?$ {
try_files $1 = 404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$1;
fastcgi_param PATH_INFO $2;
fastcgi_buffering off;
include fastcgi.conf;
}
location ~* .(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
# Optional: Don't log access to other assets
access_log off;
}
}

4.Fritzbox: Https-Weiterleitung auf den Pi

Erwartetes Verhalten
Alles sollte funktionieren :smiley:

Aktuelles Verhalten
WebDAV ist nicht nutzbar - ich habe versucht den Spaß über webdav in Windows 7 "einzuhängen" und über android (ES Dateiexplorer) drauf zuzugreifen. Auf meinem Handy kommt einfach nur die Fehlermeldung Server nicht erreichbar und Windows fragt mich 3 mal nach den Logindaten (die definitiv richtig sind! - Anmeldung über die Website funktionert) und erklärt dann, dass Zugriffsberechtigungen fehlen ... und im Adminbereich der OC werden misslungene Loginversuche angezeigt.

Server-Konfiguration
Betriebssystem: Raspbian, Win 7
Webserver-Typ: nginx
Datenbank-Typ: mysql
PHP-Version: php7

ownCloud-Version (siehe ownCloud Administrationsseite):
Von einer älteren ownCloud-Version aktualisiert oder neu installiert?: neuinstalliertes 9.1

Sonderkonfigurationen (external storage, external authentication, reverse proxy, server-side-encryption): Das Nutzerverzeichnis ist auf einen USB-Stick ausgelagert

Integrity status für oC9+

geht gerade nicht... wird nachgeliefert :slight_smile:

Vielen Dank für die Hilfe! :blush:


#2

Hi,

bitte verwende die nginx config aus der Dokumentation [1]. Alles andere wird hier nicht funktionieren und ist höchst wahrscheinlich der auslöser für Dein Problem.

Die WebDAV-Implementierung von Windows unter Win8 ist bekannt, dass sie kaputt ist und nicht verwendet werden sollte. Das funktioniert erst mit Windows8+. Hierfür sind alternativen wie z.B. Cyberduck bekannt.

[1]

https://doc.owncloud.org/server/latest/admin_manual/installation/nginx_examples.html