forked from mirrors/fancyindex
32 lines
No EOL
929 B
Text
32 lines
No EOL
929 B
Text
server {
|
|
listen 80 default_server;
|
|
client_max_body_size 1G;
|
|
|
|
location /fancyindex {
|
|
rewrite /fancyindex/(.*) /$1 break;
|
|
root /theme/Nginx-Fancyindex-Theme;
|
|
}
|
|
|
|
location / {
|
|
# manage DELETE AND MKDIR
|
|
if (-d $request_filename) { rewrite ^(.*[^/])$ $1/ break; }
|
|
|
|
root /share;
|
|
fancyindex on;
|
|
fancyindex_localtime on;
|
|
fancyindex_name_length 255; # Maximum file name length in bytes, change as you like.
|
|
# theme
|
|
fancyindex_header "/fancyindex/header.html";
|
|
fancyindex_footer "/fancyindex/footer.html";
|
|
fancyindex_ignore "fancyindex";
|
|
|
|
dav_methods PUT DELETE MKCOL COPY MOVE;
|
|
dav_ext_methods PROPFIND OPTIONS;
|
|
create_full_put_path on;
|
|
dav_access user:rw group:rw all:rw;
|
|
|
|
auth_basic "Access restricted";
|
|
auth_basic_user_file /etc/nginx/.htpasswd;
|
|
}
|
|
|
|
} |