Hi,
I have setup seafile on raspberry pi
https access working fine, I can read and copy file using seafile iOS apps
however when i try to access webdav, i got error 502 bad gateway
any idea?
Did you configure webdav in seafile and your webserver config?
I think so
Below are my config
ccnet.conf
[General]
USER_NAME = BPiM2P
ID = 07e1dc29e5dff884a71147f3c8baa42d1f8105f5
NAME = BPiM2P
SERVICE_URL = https://xxx.xxx.net:8080
[Client]
PORT = 13419
seafdav.conf
[WEBDAV]
enabled = true
port = 8081
fastcgi = true
share_name = /seafdav
seafile.conf
[fileserver]
port=8082
seahub_settings.py
-- coding: utf-8 --
SECRET_KEY = “d21(%lk3k)d^)wk6nce14+embq+=k!5q=8bs0t!odmoese=@”
HTTP_SERVER_ROOT = ‘https://xxx.xxx.net:8080/seafhttp’
nginx.conf
server {
listen 0.0.0.0:8080; # <--------------------------------------- NGINX PORT
ssl on; # <-------------------------------------------- SSL
ssl_certificate /etc/nginx/ssl/seahub.crt; # <--------- SSL
ssl_certificate_key /etc/nginx/ssl/seahub.key; # <----- SSL
server_name xxx.xxx.net; # <----------------- CHANGE THIS
error_page 497 https://$host:$server_port$request_uri; 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 HTTPS on;
fastcgi_param HTTP_SCHEME https;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
}
location /seafdav {
fastcgi_pass 127.0.0.1:8081;
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;
access_log /var/log/nginx/seafdav.access.log;
error_log /var/log/nginx/seafdav.error.log;
}
location /media {
root /home/seafile/mycloud/seafile-server-latest/seahub; # <-- change: 2014-07-11
# include /etc/nginx/mime.types; # <— UNCOMMENT THIS IF CSS FILES AREN’T LOADED
}
}
Also below is log files
seafdav.access.log
12.226.201.121 - - [12/Sep/2017:16:30:24 -0700] “GET /seafdav HTTP/1.1” 502 574 “-” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36”
seafdav.error.log
2017/09/12 16:30:24 [error] 15453#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 12.226.201.121, server: xxx.xxx.net, request: “GET /seafdav HTTP/1.1”, upstream: “fastcgi://127.0.0.1:8081”, host: “xxx.xxx.net:8080”
@shoeper Can you check, I’m on holidays and reviewing code on mobile device is not nice.
problem solved
it’s related to bad seafdav.pid like mentioned in this link below
not sure what causing bad pid?