-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Frugalware-Art.org Artwork for Frugalware Linux 
 Arch-Stuff.org Artwork and Stuff for Arch Linux 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com    Open-PC.com   
Linux42.orgRegister  
Login  
-
- New questions .- Answered question .- Not answered question .- My questions .- Post your question here . 
Go back to the overview page to see other entries
Back to overview

0
votes
click to vote up

problem owncloud webdav on nginx and davfs2


ownCloud - Apr 14 2012
not answered
Question:I tried to used davfs2 on debian 6.0.4 for works owncloud webdav, but received a message from nginx is not allowed to use the OPTIONS.

$ sudo mount -t davfs https://cloud-storage.mydomain.com/files/webdav.php /mnt/cloud-storage.mydomain.com
Please enter the username to authenticate with server
https://cloud-storage.mydomain.com/files/webdav.php or hit enter for none.
Username: denis
Please enter the password to authenticate user denis with server
https://cloud-storage.mydomain.com/files/webdav.php or hit enter for none.
Password:
/sbin/mount.davfs: Mounting failed.
405 Not Allowed

In nginx access.log:
- - [13/Apr/2012:23:57:18 +0400] "OPTIONS /files/webdav.php/ HTTP/1.1" 405 141 "-" "davfs2/1.4.6 neon/0.29.3

$ nginx -v
nginx version: nginx/1.0.15


i'm recompiled nginx and adding module https://github.com/arut/nginx-dav-ext-module
and add in vhost config: dav_ext_methods PROPFIND OPTIONS;
but new error:

$ sudo mount -t davfs https://cloud-storage.mydomain.com/files/webdav.php /mnt/cloud-storage.mydomain.com
Please enter the username to authenticate with server
https://cloud-storage.mydomain.com/files/webdav.php or hit enter for none.
Username: denis
Please enter the password to authenticate user denis with server
https://cloud-storage.mydomain.com/files/webdav.php or hit enter for none.
Password:
/sbin/mount.davfs: warning: the server does not support locks
$ ls /mnt/cloud-storage.mydomain.com
404 lost+found

In nginx access.log:
[14/Apr/2012:01:50:44 +0400] "PROPFIND /files/webdav.php/ HTTP/1.1" 207 249 "-" "davfs2/1.4.6 neon/0.29.3"

if edit /etc/davfs2/davfs2.conf
use_locks 0

and run:
sudo umount /mnt/cloud-storage.mydomain.com
sudo mount -t davfs https://cloud-storage.mydomain.com/files/webdav.php /mnt/cloud-storage.mydomain.com

All installed fine. But in the contents of the directory is not what it really is.

$ ls -la /mnt/cloud-storage.mydomain.com
итого 1
drwxr-xr-x 3 root root 104 Апр 14 02:05 .
-rw-r--r-- 1 root root 0 Апр 14 02:05 404
drwx------ 2 root root 0 Апр 14 01:47 lost+found
$ file /mnt/cloud-storage.mydomain.com/404
/mnt/cloud-storage.mydomain.com/404: empty

nginx virtualhost config:

server {
listen 443 ssl;
ssl_certificate /etc/nginx/cert/cloud-storage.mydomain.com.crt;
ssl_certificate_key /etc/nginx/cert/cloud-storage.mydomain.com.key;
server_name cloud-storage.mydomain.com;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers AES256-SHA:AES128-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
access_log /var/log/nginx/cloud-storage.mydomain.com/access.log;
error_log /var/log/nginx/cloud-storage.mydomain.com/error.log;
root /var/www/cloud-storage.mydomain.com;
index index.php;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
create_full_put_path on;
dav_access user:rw group:rw all:r;
client_max_body_size 1000M; # set maximum upload size
add_header Strict-Transport-Security max-age=31536000;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Security-Policy "allow 'self';";
add_header X-XSS-Protection "1; mode=block";
add_header Content-Length $content_length;
set $server_headers $server_name;
more_set_headers 'Server: $server_headers-webservers';
keepalive_timeout 70;

location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}

location / {
try_files $uri $uri/ @webdav;
}

location @webdav {
try_files $uri $uri/ 404;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_pass unix:/var/run/fpm/cloud-storage.mydomain.com.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi_params;
}

location ~ \.php$ {
try_files $uri $uri/ 404;
fastcgi_pass unix:/var/run/fpm/cloud-storage.mydomain.com.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi_params;
}
location ~ /.svn/ {
deny all;
}
location ~ /.git/ {
deny all;
}
location ~ /.cvs/ {
deny all;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
log_not_found off;
access_log off;
}
}





Add answer
Back to overview


Add comment

Do you have a question?
Post your question here






-


Copyright 2010-2014 Linux42.org Team  Legal Notice
All rights reserved. Linux42.org is not liable for any content or goods on this site.
You can find our FAQ here.
All contributors are responsible for the lawfulness of their uploads.
Please send us a notice if you spot an ABUSE of the website.
Information about advertising in Linux42.org.
Developers can use our public webservice interface. More information here: public api
For further information or comments on this site, please send us a message