nginx:ディレクトリリストの長いファイル名

nginx:ディレクトリリストの長いファイル名

OpenBSD 5.4、64ビットでnginx / 1.4.1を使用する:

ここに画像の説明を入力してください。

ディレクトリリストを使用するときに完全なファイル名を表示するように(または少なくともファイル名にデフォルトのファイル名を表示するように)、nginxをどのように設定できますか?

Google検索では、次の情報のみを提供しました。

http://forum.nginx.org/read.php?2,124400,167420#msg-167420
January 18, 2011 08:36PM
fagtron
I looked all over the net and wasn't able to find this answer anyway, so I looked into the nginx source files and it's very easy.

Simply modify the file located at [b]src/http/modules/ngx_http_autoindex_module.c[/b] and then compile.

Change these lines:

[b]#define NGX_HTTP_AUTOINDEX_PREALLOCATE 50

#define NGX_HTTP_AUTOINDEX_NAME_LEN 50[/b]

to whatever you want, such as:

[b]#define NGX_HTTP_AUTOINDEX_PREALLOCATE 100

#define NGX_HTTP_AUTOINDEX_NAME_LEN 100[/b]

And then compile and restart nginx. That's it !!!

質問:では、再コンパイルする他の方法はありませんか?

ベストアンサー1

fancyindex モジュールと fancyindex_name_length パラメーターを使用して、ファイル名の長さを構成できます。

おすすめ記事