forked from mirrors/fancyindex
first version
This commit is contained in:
commit
9d467e78c1
7 changed files with 254 additions and 0 deletions
32
src/default.conf
Normal file
32
src/default.conf
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue