# dav and dav_ext modules should be compiled in location /portage { root /usr; client_body_temp_path /tmp; dav_methods PUT MKCOL COPY MOVE; dav_ext_methods PROPFIND OPTIONS; create_full_put_path on; dav_access user:rw group:rw all:r; auth_basic "password-protected"; auth_basic_user_file /etc/nginx/.passwd; limit_except GET { allow 10.0.0.0/24; deny all; } }