ngx_http_autoindex_module モジュール

設定例
ディレクティブ
     autoindex
     autoindex_exact_size
     autoindex_format
     autoindex_localtime

ngx_http_autoindex_module モジュールはスラッシュ文字('/')で終わるリクエストを処理し、ディレクトリのリストを生成します。通常はngx_http_index_moduleモジュールがindexファイルを見つけられない時に、リクエストがngx_http_autoindex_moduleモジュールに渡されます。

設定例

location / {
    autoindex on;
}

ディレクティブ

構文: autoindex on | off;
デフォルト:
autoindex off;
コンテキスト: http, server, location

ディレクトリのリスト出力を有効または無効にします。

構文: autoindex_exact_size on | off;
デフォルト:
autoindex_exact_size on;
コンテキスト: http, server, location

HTML formatのために、ディレクトリリストの中で正確なファイルサイズが出力されるべきか、あるいはキロバイト、メガバイトおよびギガバイトで丸められたサイズで出力されるべきかを指定します。

構文: autoindex_format html | xml | json | jsonp;
デフォルト:
autoindex_format html;
コンテキスト: http, server, location

このディレクティブはバージョン1.7.9から導入されました。

ディレクトリリストのフォーマットを設定します。

JSONPフォーマットが使われた場合、コールバック関数の名前はcallback リクエスト引数を使って設定されます。引数が無いあるいは空の場合は、JSONフォーマットが使われます。

XML出力は ngx_http_xslt_module モジュールを使って変換することができます。

構文: autoindex_localtime on | off;
デフォルト:
autoindex_localtime off;
コンテキスト: http, server, location

HTMLformatのために、ディレクトリのリストの中の時間に、ローカルタイムゾーンまたはUTCで出力すべきかどうかを指定します。

TOP
inserted by FC2 system