一行配置美化 nginx 目錄 autoindex.html


demo🚀

安裝

參考🚀

  1. 配置 autoindex.html ⏬
    在 nginx autoindex 指令下面添加 add_after_body /autoindex.html; 然后重啟 nginx 即可

  2. add_after_body

# download autoindex.html to /wwwroot/
location ~ ^(.*)/$ {
    charset utf-8;
    autoindex on;
    autoindex_localtime on;
    autoindex_exact_size off;
    add_after_body /autoindex.html;
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM