diff --git a/image/seafile_7.1/templates/seafile.nginx.conf.template b/image/seafile_7.1/templates/seafile.nginx.conf.template index 8059ab50..28e19519 100644 --- a/image/seafile_7.1/templates/seafile.nginx.conf.template +++ b/image/seafile_7.1/templates/seafile.nginx.conf.template @@ -68,23 +68,20 @@ server { error_log /var/log/nginx/seafhttp.error.log; } - location /seafdav { + location /seafdav { + + proxy_pass http://127.0.0.1:8080/seafdav; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 1200s; client_max_body_size 0; - 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; access_log /var/log/nginx/seafdav.access.log seafileformat; error_log /var/log/nginx/seafdav.error.log; + } location /media {