52ll.org
52ll.org

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

效果

https://52ll.org/wp-content/uploads/2020/03/Snipaste_2020-03-18_11-02-03.png

发表回复

textsms
account_circle
email

*

code

52ll.org

nginx 浏览目录美化
nginx配置 location / { root /home/wwwroot/xxx.me; fancyindex on; fancyindex_exact_size off; fancyindex_localtime on; fancyindex_name_length 255; # Max…
扫描二维码继续阅读
2020-03-18