Dear Seafile Support Team and Community Users,
I’m using Seafile since 4 years and I have tried out different OS running Seafile Server with good findings.
My current private project is to move my own private cloud storage from my virtual machine with Ubuntu 14.04.4 LTS running Seafile Server 5.0.5 using Apache and SQLite with Seafile using HTTPS and WebDav using HTTP which is running fully stable to a new virtual machine with Ubuntu Server 16.04.1 LTS running Seafile Server 6.0.6 using NGINX, HTTPS (seafile+webdav) and MySQL.
Seafile and seahub is up and running. And I’m able to access to Seafile Server 6.0.6 using Webinterface and Seafile-Client. The Seafile Server 6.0.6 looks like fully functional.
But unfortunately I’m unable to connect to Webdav: https://my.domain.de:8080/seafdav/
The log files for nginx/seafdav* are empty:
root@seaf-priv:/var/log/nginx# ls -latr
total 104
-rw-r--r-- 1 www-data root 0 Dec 4 01:08 seafdav.error.log
-rw-r--r-- 1 www-data root 0 Dec 4 01:08 seafdav.access.log
I have deactivated the firewall for troubleshooting:
root@seaf-priv:~# ufw status
Status: inactive
The active connections looks okay for me:
root@seaf-priv:~# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1156/mysqld
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 1359/python2.7
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1243/nginx -g daemo
tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN 1360/seaf-server
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1135/sshd
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 1243/nginx -g daemo
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 1447/python2.7
tcp6 0 0 :::22 :::* LISTEN 1135/sshd
This is the seafdav.conf:
[WEBDAV]
enabled = true
port = 8080
fastcgi = true
share_name = /seafdav
And this is the seafile.conf:
[general]
enable_syslog = true
[fileserver]
port = 8082
web_token_expire_time = 7200
[database]
type = mysql
host = 127.0.0.1
port = 3306
user = seafile
password = xxx
db_name = seafile-db
connection_charset = utf8
max_connections = 1000
[quota]
default = 400GB
[zip]
windows_encoding = iso-8859-1
And this is the /etc/nginx/sites-available/seafile.conf:
server {
listen 80;
server_name my.domain.de;
rewrite ^ https://$http_host$request_uri? permanent;
}
server {
listen 443;
ssl on;
ssl_certificate /home/seacloud/seaf-server/cacert.pem;
ssl_certificate_key /home/seacloud/seaf-server/privkey.pem;
server_name my.domain.de;
proxy_set_header X-Forwarded-For $remote_addr;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
server_tokens off;
location / {
fastcgi_pass 127.0.0.1:8000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
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 SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
fastcgi_read_timeout 36000;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
proxy_request_buffering off;
send_timeout 36000s;
}
location /seafdav {
fastcgi_pass 127.0.0.1:8080;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
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 SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
# This option is only available for Nginx >= 1.8.0. See more details below.
proxy_request_buffering off;
access_log /var/log/nginx/seafdav.access.log;
error_log /var/log/nginx/seafdav.error.log;
}
location /media {
root /home/seacloud/seaf-server/seafile-server-latest/seahub;
}
}
To see whether WebDav is generally working I have change the configuration temporarily. I have found a hint to change the configuration for troubleshooting as followed to see whether it is possible to connect to: https://my.domain.de:8080/seafdav/seafile_logo.png
But unfortunately it does not work. And it is very interesting the web browsers Safari and Firefox does not run into a time out or connection error. Only a “working ring” is visible.
And the log files are still empty:
root@seaf-priv:/var/log/nginx# ls -latr
total 96
-rw-r--r-- 1 www-data root 0 Dec 4 01:08 seafdav.error.log
-rw-r--r-- 1 www-data root 0 Dec 4 01:08 seafdav.access.log
The firewall is still inactive:
root@seaf-priv:/var/log/nginx# ufw status
Status: inactive
And the active connections are:
root@seaf-priv:/var/log/nginx# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1144/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1691/nginx -g daemo
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1347/python2.7
tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN 1348/seaf-server
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1122/sshd
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 1691/nginx -g daemo
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 1532/python2.7
tcp6 0 0 :::22 :::* LISTEN 1122/sshd
I have added the last line to seafdav.conf for troubleshooting:
[WEBDAV]
enabled = true
port = 8080
fastcgi = true
share_name = /seafdav
host = 0.0.0.0
And also I have added this line:
host = 0.0.0.0
for troubleshooting to seafile.conf:
[general]
enable_syslog = true
[fileserver]
host = 0.0.0.0
port = 8082
web_token_expire_time = 7200
[database]
type = mysql
host = 127.0.0.1
port = 3306
user = seafile
password = xxx
db_name = seafile-db
connection_charset = utf8
max_connections = 1000
[quota]
default = 400GB
[zip]
windows_encoding = iso-8859-1
For troubleshooting I have out comment lines in /etc/nginx/sites-available/seafile.conf - see below - and I have added this two lines:
rewrite ^/seafdav(.*)$ /media/img$1 break;
root /home/seacloud/seaf-server/seafile-server-latest/seahub;
Fully troubleshooting configuration of /etc/nginx/sites-available/seafile.conf:
server {
listen 80;
server_name my.domain.de;
rewrite ^ https://$http_host$request_uri? permanent;
}
server {
listen 443;
ssl on;
ssl_certificate /home/seacloud/seaf-server/cacert.pem;
ssl_certificate_key /home/seacloud/seaf-server/privkey.pem;
server_name my.domain.de;
proxy_set_header X-Forwarded-For $remote_addr;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
server_tokens off;
location / {
fastcgi_pass 127.0.0.1:8000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
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 SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
fastcgi_read_timeout 36000;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
proxy_request_buffering off;
send_timeout 36000s;
}
location /seafdav {
# fastcgi_pass 127.0.0.1:8080;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_param PATH_INFO $fastcgi_script_name;
#
# fastcgi_param SERVER_PROTOCOL $server_protocol;
# 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 SERVER_ADDR $server_addr;
# fastcgi_param SERVER_PORT $server_port;
# fastcgi_param SERVER_NAME $server_name;
# fastcgi_param HTTPS on;
# fastcgi_param HTTP_SCHEME https;
#
# client_max_body_size 0;
# proxy_connect_timeout 36000s;
# proxy_read_timeout 36000s;
# proxy_send_timeout 36000s;
# send_timeout 36000s;
#
# # This option is only available for Nginx >= 1.8.0. See more details below.
# proxy_request_buffering off;
rewrite ^/seafdav(.*)$ /media/img$1 break;
root /home/seacloud/seaf-server/seafile-server-latest/seahub;
access_log /var/log/nginx/seafdav.access.log;
error_log /var/log/nginx/seafdav.error.log;
}
location /media {
root /home/seacloud/seaf-server/seafile-server-latest/seahub;
}
}
Now I’m unsure whether it is a configuration error, because the nginx log files for seafdav are empty in both cases.
Furthermore I have tried to switch seafdav to not using fastcgi and http only. But with the same result.
Has anyone a idea how to get webdav running in this setup:
- Ubuntu Server 16.04.1 LTS
- Seafile Server 6.0.6
- NGINX with HTTPS (for seafile+webdav)
- MySQL
Thanks in advance for your support.
Greetings
lucki.luck
