Can't connect webdav

Server OS :
H/W : ARMv8 Single Board Computer
S/W : Docker on ubuntu 16.04

Pydio version : 8.0.0
Pydio deployment type : docker - linuxserver/pydio container X
edit : deployment type : docker - https://hub.docker.com/r/lsioarmhf/pydio-aarch64/ O

Underlying stack information :
nginx/1.12.2, php 7.1.15v and mariadb(Other containers, SQL Remote Login)
can’t include apt-get, bash-completetion, etc… on this container
Block 80 port and 443 port via ISP
can’t upgrade to pydio 8.0.2. but this is not a question.

and I can’t english well… plz easy english :smiley:

Main subject :
I follow WebDAV Preferences (My account > WebDAV Preferences > Show alternative URLs(mount workspaces spparately)

Server Setting :
https://imgur.com/a/dXenv

> sudo mount.davfs https://127.0.0.1:8443/shares/my-files /media/usb
mount.davfs: Mounting failed.
404 Not Found

and many try… (About 80 commands)

1077 sudo mount -t davfs XXXXXX:8443/shares/my-files webdav/ -o uid=1000 -o gid=1000
1078 sudo mount -t davfs XXXXXX:8443/webdav/ -o uid=1000 -o gid=1000 -o
1079 sudo mount -t davfs XXXXXX:8443/shares/my-files webdav/ -o uid=1000 -o gid=1000

1082 sudo mount -t davfs XXXXXX:8443/shares/my-files /home/dev/webdav -o uid=1000 -o gid=1000
1083 sudo mount -t davfs XXXXXX:8443/shares/ /home/dev/webdav -o uid=1000 -o gid=1000
1084 sudo mount -t davfs XXXXXX:8443/ /home/dev/webdav -o uid=1000 -o gid=1000
1085 sudo mount -t davfs XXXXXX:8443/shares/my-files /home/dev/webdav -o uid=1000 -o gid=1000
1086 sudo mount -t davfs XXXXXX:8443/webdav/shares/my-files /home/dev/webdav -o uid=1000 -o gid=1000

Is this the correct command I entered?

How does your nginx config look like?

Do you have correctly set the username and the password in the ~/.davfs2/secrets file ?

What to you get in the webdav server log ?

My nginx.conf file :
# /etc/nginx/nginx.conf

user nginx;

# Set number of worker processes automatically based on number of CPU cores.
worker_processes auto;

# Enables the use of JIT for regular expressions to speed-up their processing.
pcre_jit on;

# Configures default error logger.
error_log /var/log/nginx/error.log warn;

# Includes files with directives to load dynamic modules.
include /etc/nginx/modules/*.conf;


events {
		# The maximum number of simultaneous connections that can be opened by
		# a worker process.
		worker_connections 1024;
}

http {
		# Includes mapping of file name extensions to MIME types of responses
		# and defines the default type.
		include /etc/nginx/mime.types;
		default_type application/octet-stream;

		# Name servers used to resolve names of upstream servers into addresses.
		# It's also needed when using tcpsocket and udpsocket in Lua modules.
		#resolver 208.67.222.222 208.67.220.220;

		# Don't tell nginx version to clients.
		server_tokens off;

		# Specifies the maximum accepted body size of a client request, as
		# indicated by the request header Content-Length. If the stated content
		# length is greater than this size, then the client receives the HTTP
		# error code 413. Set to 0 to disable.
		client_max_body_size 1m;

		# Timeout for keep-alive connections. Server will close connections after
		# this time.
		keepalive_timeout 65;

		# Sendfile copies data between one FD and other from within the kernel,
		# which is more efficient than read() + write().
		sendfile on;

		# Don't buffer data-sends (disable Nagle algorithm).
		# Good for sending frequent small bursts of data in real time.
		tcp_nodelay on;

		# Causes nginx to attempt to send its HTTP response head in one packet,
		# instead of using partial frames.
		#tcp_nopush on;


		# Path of the file with Diffie-Hellman parameters for EDH ciphers.
		#ssl_dhparam /etc/ssl/nginx/dh2048.pem;

		# Specifies that our cipher suits should be preferred over client ciphers.
		ssl_prefer_server_ciphers on;

		# Enables a shared SSL cache with size that can hold around 8000 sessions.
		ssl_session_cache shared:SSL:2m;


		# Enable gzipping of responses.
		#gzip on;

		# Set the Vary HTTP header as defined in the RFC 2616.
		gzip_vary on;

		# Enable checking the existence of precompressed files.
		#gzip_static on;


		# Specifies the main log format.
		log_format main '$remote_addr - $remote_user [$time_local] "$request" '
						'$status $body_bytes_sent "$http_referer" '
						'"$http_user_agent" "$http_x_forwarded_for"';

		# Sets the path, format, and configuration for a buffered log write.
		access_log /var/log/nginx/access.log main;


		# Includes virtual hosts configs.
		include /etc/nginx/conf.d/*.conf;
}

ps. /etc/nginx/conf.d/ directory is empty

@neverapple88 I think you have missed this page:
https://pydio.com/en/docs/kb/system/installing-debiannginx

I haven’t ~/.davfs2/secrets file and /etc/davfs2/secrets files’s inside -> All # * (comments) - Ugly my English

I don’t setting username and the password in the secrets file.

I can’t find webdav server log.

but, I tried to find it.
$ find . -type f | xargs awk "/webdav/ {print FILENAME} in my log folder
./log/pydio/access_pydio6_log
./log/pydio/access_pydio6_log

For more information :
Line 629: 192.168.200.120 - - [18/Mar/2018:13:02:09 +0900] “GET /webdav HTTP/1.1” 404 327 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0”
Line 881: 172.17.0.1 - - [18/Mar/2018:13:35:52 +0900] “OPTIONS /webdav/shares/my-files/ HTTP/1.1” 404 619 “-” “davfs2/1.5.2 neon/0.30.1”

The nginx config is wrong it does not handle correcly the redirects.
did you setup that config by yourself ?

Add : Pydio deployment type :https://hub.docker.com/r/lsioarmhf/pydio-aarch64/
sry, (I wrote at the beginning) Pydio deployment type : docker - linuxserver/pydio container is wrong

I did not set up.
just docker pull lsioarmhf/pydio-aarch64 and docker run … lsioarmhf/pydio-aarch64
I should have looked at how to install on Debian once … sorry.

About nginx.conf :
I find .conf through nginx -V. but, this is was a useless file…
Modify .conf file -> no apply.

real configuration file :
in /conflig

├── nginx.conf
└── site-confs
    └── default

original nginx.conf
user abc;
worker_processes 4;
pid /run/nginx.pid;

events {
	worker_connections 768;
	# multi_accept on;
}

http {

	##
	# Basic Settings
	##

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 65;
	types_hash_max_size 2048;
	# server_tokens off;

	# server_names_hash_bucket_size 64;
	# server_name_in_redirect off;

	client_max_body_size 0;

	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	##
	# Logging Settings
	##

	access_log /config/log/nginx/access.log;
	error_log /config/log/nginx/error.log;

	##
	# Gzip Settings
	##

	gzip on;
	gzip_disable "msie6";

	# gzip_vary on;
	# gzip_proxied any;
	# gzip_comp_level 6;
	# gzip_buffers 16 8k;
	# gzip_http_version 1.1;
	# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

	##
	# nginx-naxsi config
	##
	# Uncomment it if you installed nginx-naxsi
	##

	#include /etc/nginx/naxsi_core.rules;

	##
	# nginx-passenger config
	##
	# Uncomment it if you installed nginx-passenger
	##

	#passenger_root /usr;
	#passenger_ruby /usr/bin/ruby;

	##
	# Virtual Host Configs
	##
	include /etc/nginx/conf.d/*.conf;
        include /config/nginx/site-confs/*;
}


#mail {
#	# See sample authentication script at:
#	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#	# auth_http localhost/auth.php;
#	# pop3_capabilities "TOP" "USER";
#	# imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#	server {
#		listen     localhost:110;
#		protocol   pop3;
#		proxy      on;
#	}
#
#	server {
#		listen     localhost:143;
#		protocol   imap;
#		proxy      on;
#	}
#}
daemon off;

original site-confs/default :

server {
        server_name _;
        root /config/www/pydio;
        index index.php;
        listen 443 ssl;
        keepalive_requests    10;
        keepalive_timeout     60 60;
        access_log /config/log/pydio/access_pydio6_log;
        error_log /config/log/pydio/error_pydio6_log;

        ssl_certificate /config/keys/cert.crt;
        ssl_certificate_key /config/keys/cert.key;
        client_max_body_size 0;
        client_body_buffer_size 128k;

        rewrite ^/dashboard|^/settings|^/welcome|^/ws- /index.php last;
        if ( !-e $request_filename ) {
                # WebDAV Rewrites
                rewrite ^/shares /dav.php last;
                # Sync client
                rewrite ^/api /rest.php last;
                # External users
                rewrite ^/user ./index.php?get_action=user_access_point last;
                # Catch all others
                rewrite ^(.*)$ /index.php break;
        }

        # Prevent Clickjacking
        add_header X-Frame-Options "SAMEORIGIN";

        # Only allow these request methods and do not accept DELETE, SEARCH and other methods
        if ( $request_method !~ ^(GET|HEAD|POST|PROPFIND|OPTIONS)$ ) {
                return 444;
        }

        location ~* ^/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
                deny all;
        }
        # Enables PHP
        location ~ \.php$ {
                # for ^/(index|plugins) request_uri should be changed
                set $request_url $request_uri;
                include /etc/nginx/fastcgi_params;
                fastcgi_param  REQUEST_URI $request_url;
                try_files $uri =404;
                fastcgi_pass 127.0.0.1:9000;
        }

       # Enables Caching
        location ~* \.(ico|css|js)$ {
                 expires 7d;
                add_header Pragma public;
                add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        }
}

ps. include /etc/nginx/conf.d/.conf;
include /config/nginx/site-confs/
;

I try See Pydio 6 Nginx Configuration and modify nginx.conf and site-confs/default
but The same error, sudo mount.davfs return message is 404 Not Found.

You need to set up a proper nginx virtual host. Here is a beginning: https://pydio.com/de/docs/kb/system/installing-debiannginx

As you can see default configures for port 443 and set proper redirects,
you must ser the same redirects for server on port 8443

Nice working!!
Thank you for your kind explanation.

ps. I containter’s 443 ports to host’s 8443. It’s mapping.
(docker -p 8443:443 …) :wink:

Test Commands :

$ sudo mount.davfs https://127.0.0.1:8443/shares/my-files /media/usb
[sudo] password for myname:
Please enter the username to authenticate with server
https://127.0.0.1:8443/shares/my-files or hit enter for none.
  Username: myserverid
Please enter the password to authenticate user dev with server
https://127.0.0.1:8443/shares/my-files or hit enter for none.
  Password:
mount.davfs: the server certificate does not match the server name
mount.davfs: the server certificate is not trusted
  issuer:      LSIO Server, Linuxserver.io, Carlsbad, CA, US
  subject:     LSIO Server, Linuxserver.io, Carlsbad, CA, US
  identity:    *
  fingerprint: de:85:a4:21:19:92:85:7a:a0:49:db:46:cd:8a:2f:1a:98:00:f0:88
You only should accept this certificate, if you can
verify the fingerprint! The server might be faked
or there might be a man-in-the-middle-attack.
Accept certificate for this session? [y,N] y

$ cd /media/usb
$ ls
cat_test.txt  lost+found  recycle_bin  test_folder  Test.PNG
$ cat cat_test.txt
Hello World!!%
$ file Test.PNG
Test.PNG: PNG image data, 1245 x 627, 8-bit/color RGBA, non-interlaced

nginx.conf (same)

    user abc;
    worker_processes 4;
    pid /run/nginx.pid;

    events {
	worker_connections 768;
	# multi_accept on;
}

http {
	##
	# Basic Settings
	##

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 65;
	types_hash_max_size 2048;
	# server_tokens off;

	# server_names_hash_bucket_size 64;
	# server_name_in_redirect off;

	client_max_body_size 0;

	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	##
	# Logging Settings
	##

	access_log /config/log/nginx/access.log;
	error_log /config/log/nginx/error.log;

	##
	# Gzip Settings
	##

	gzip on;
	gzip_disable "msie6";

	# gzip_vary on;
	# gzip_proxied any;
	# gzip_comp_level 6;
	# gzip_buffers 16 8k;
	# gzip_http_version 1.1;
	# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

	##
	# nginx-naxsi config
	##
	# Uncomment it if you installed nginx-naxsi
	##

	#include /etc/nginx/naxsi_core.rules;

	##
	# nginx-passenger config
	##
	# Uncomment it if you installed nginx-passenger
	##

	#passenger_root /usr;
	#passenger_ruby /usr/bin/ruby;

	##
	# Virtual Host Configs
	##
	include /etc/nginx/conf.d/*.conf;
        include /config/nginx/site-confs/*;
}


#mail {
#	# See sample authentication script at:
#	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#	# auth_http localhost/auth.php;
#	# pop3_capabilities "TOP" "USER";
#	# imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#	server {
#		listen     localhost:110;
#		protocol   pop3;
#		proxy      on;
#	}
#
#	server {
#		listen     localhost:143;
#		protocol   imap;
#		proxy      on;
#	}
#}
daemon off;

site-confs/default :

server {
    listen 80;
    ### Change the following line to match your website name
    server_name _;
    rewrite ^ https://$server_name$request_uri? permanent;
}

server {
    listen 443 ssl;
    ### Change the following line to match your website name
    server_name _;
    root /config/www/pydio;
    index index.php;

    ### If you changed the maximum upload size in PHP.ini, also change it below
    client_max_body_size 20G;

    # Prevent Clickjacking
    add_header X-Frame-Options "SAMEORIGIN";

    # SSL Settings
    ### If you are using different names for your SSL certificate and key, change them below:
    ssl on;
    ssl_certificate /config/keys/cert.crt;
    ssl_certificate_key /config/keys/cert.key;

    # This settings are destined to limit the supported crypto suites, this is optional and may restrict the availability of your website.
    #ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
    #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    add_header Strict-Transport-Security "max-age=16070400; includeSubdomains";

    keepalive_requests    10;
    keepalive_timeout     60 60;
    access_log /config/log/pydio/access_pydio6_log;
    error_log /config/log/pydio/error_pydio6_log;

    client_body_buffer_size 128k;
    # All non existing files are redirected to index.php
    if (!-e $request_filename){
        # For old links generated from Pydio 6
        rewrite ^/data/public/([a-zA-Z0-9_-]+)$ /public/$1? permanent;
        rewrite ^(.*)$ /index.php last;
    }

    # Manually deny some paths to ensure Pydio security
    location ~* ^/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
            deny all;
    }

    # Forward PHP so that it can be executed
    location ~ \.php$ {

            fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
            fastcgi_param  SERVER_SOFTWARE    nginx;
            fastcgi_param  QUERY_STRING       $query_string;
            fastcgi_param  REQUEST_METHOD     $request_method;
            fastcgi_param  CONTENT_TYPE       $content_type;
            fastcgi_param  CONTENT_LENGTH     $content_length;
            fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
            fastcgi_param  REQUEST_URI        $request_uri;
            fastcgi_param  DOCUMENT_URI       $document_uri;
            fastcgi_param  DOCUMENT_ROOT      $document_root;
            fastcgi_param  SERVER_PROTOCOL    $server_protocol;
            fastcgi_param  REMOTE_ADDR        $remote_addr;
            fastcgi_param  REMOTE_PORT        $remote_port;
            fastcgi_param  SERVER_ADDR        $server_addr;
            fastcgi_param  SERVER_PORT        $server_port;
            fastcgi_param  SERVER_NAME        $server_name;

            try_files $uri =404;
            fastcgi_pass 127.0.0.1:9000;
    }

    # Enables Caching
    location ~* \.(ico|css|js)$ {
        expires 7d;
        add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }
}