Site Tools


software:nginx:webdav

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
software:nginx:webdav [2015/07/01 01:06]
– [Проблема 5 - переименование] root
software:nginx:webdav [2022/02/02 00:45]
root
Line 287: Line 287:
  error_page 599 = @propfind_handler;  error_page 599 = @propfind_handler;
  error_page 598 = @delete_handler;  error_page 598 = @delete_handler;
- error_page 597 = @move_handler;+ error_page 597 = @copy_move_handler;
  open_file_cache off;  open_file_cache off;
  client_max_body_size 50m;  client_max_body_size 50m;
Line 303: Line 303:
  if ($request_method = DELETE) {  if ($request_method = DELETE) {
  return 598;  return 598;
 + }
 + if ($request_method = COPY) {
 + return 597;
  }  }
  if ($request_method = MOVE) {  if ($request_method = MOVE) {
Line 308: Line 311:
  }  }
  
- dav_methods PUT MKCOL; # COPY+ dav_methods PUT MKCOL;
  dav_ext_methods OPTIONS;  dav_ext_methods OPTIONS;
  create_full_put_path on;  create_full_put_path on;
Line 320: Line 323:
 location @propfind_handler { location @propfind_handler {
  internal;  internal;
 +
 + auth_basic "Private site";
 + auth_basic_user_file /usr/local/etc/nginx/secure/authbasic.htpasswd;
  
  open_file_cache off;  open_file_cache off;
Line 330: Line 336:
 location @delete_handler { location @delete_handler {
  internal;  internal;
 +
 + auth_basic "Private site";
 + auth_basic_user_file /usr/local/etc/nginx/secure/authbasic.htpasswd;
  
  open_file_cache off;  open_file_cache off;
Line 338: Line 347:
  dav_methods DELETE;  dav_methods DELETE;
 } }
-location @move_handler {+location @copy_move_handler {
  internal;  internal;
 +
 + auth_basic "Private site";
 + auth_basic_user_file /usr/local/etc/nginx/secure/authbasic.htpasswd;
  
  open_file_cache off;  open_file_cache off;
Line 347: Line 359:
  }  }
  root $webdav_root;  root $webdav_root;
- dav_methods MOVE;+ dav_methods COPY MOVE;
 } }
 location / { location / {
Line 364: Line 376:
   - в папке "/mnt/WebDav_folder" должна существовать папка Family   - в папке "/mnt/WebDav_folder" должна существовать папка Family
   - location ^~ **/Family** - означает что клиент должен использовать URL: https://SERVER_ADDRESS**/Family**   - location ^~ **/Family** - означает что клиент должен использовать URL: https://SERVER_ADDRESS**/Family**
 +  - директивы **auth_basic** и **auth_basic_user_file** должны быть в каждом **location** который осуществляет обработку запросов, см [[https://github.com/dgraziotin/docker-nginx-webdav-nononsense/issues/15|DELETE requests work unauthenticated]]
  
  
Line 390: Line 403:
  
  
 +==== Полезное ====
 +  * Дальнейшая разработка решения происходит тут: [[https://github.com/dgraziotin/docker-nginx-webdav-nononsense|docker-nginx-webdav-nononsense]] - настоятельно рекомендую хотя бы посмотреть все решения которые там применены
 +  * Патч [[https://github.com/arut/nginx-dav-ext-module/pull/56|Fix PROPFIND fail with 500 on simlinks to non exist file/dir.]]
software/nginx/webdav.txt · Last modified: 2022/02/05 04:30 by root