nginx 浏览目录美化¶
nginx配置 网站根目录配置 以下命令需在网站根目录下执行 效果
nginx配置¶
location / {
root /home/wwwroot/xxx.me;
fancyindex on;
fancyindex_exact_size off;
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";
}
网站根目录配置¶
以下命令需在网站根目录下执行
mkdir fancyindex
cd fancyindex
wget https://52ll.org/wp-content/uploads/2020/03/fancyindex.zip
unzip fancyindex.zip
rm -rf fancyindex.zip
lnmp nginx restart
效果¶
