NGINX 沒有 index.html 預設顯示目錄索引

可以參考這一篇

 https://serverfault.com/questions/312796/custom-autoindex-pages-with-nginx

設定 nginx 沒有 index.html 有索引檔案

location / { autoindex on; autoindex_format xml; xslt_stylesheet /path/to/custom.xslt }


但是設定好不是很美觀, 沒有 CSS 的排版及顏色 

https://github.com/gibatronic/ngx-superbindex 

再參考這個專案, 改成 xslt 檔案來配顏色及排版.



大功告成!!




留言

這個網誌中的熱門文章

Linux 下使用終端機連接 switch (minicom)

VMWARE VM linux 擴充硬碟空間

透過 curl 的 timeout 設定識別 http 的網路連線壅塞問題