Mercurial > dirlist-php
diff README.md @ 23:949398173ecb
Much simpler setup with $request_filename.
Configuration change, bump version.
author | edogawaconan <me@myconan.net> |
---|---|
date | Thu, 23 Oct 2014 21:47:51 +0900 |
parents | b6b65a5b9c1a |
children | f9588ccb7a42 |
line wrap: on
line diff
--- a/README.md Thu Oct 23 21:07:21 2014 +0900 +++ b/README.md Thu Oct 23 21:47:51 2014 +0900 @@ -9,29 +9,34 @@ include fastcgi_params; fastcgi_pass unix:/tmp/php-fcgi.sock; uninitialized_variable_warn off; - fastcgi_param DL_PREFIX $dl_root; - fastcgi_param DL_ROOT $dl_prefix; + fastcgi_param DL_DIR $dl_dir; fastcgi_param SCRIPT_FILENAME /path/to/index.php; } -(adjust the path to `index.php` and `php-fcgi`) +(adjust the path to `index.php` and `php-fcgi`). -And then whenever you want to autoindex a folder just add +And whenever a directory needs to be autoindexed, add location / { try_files $uri @lister; } -Note that if your directory is aliased, you need to set `$dl_prefix` (fastcgi `DL_PREFIX`) and `$dl_root` (fastcgi `DL_ROOT`). +. + +Note that if the directory is aliased, `$dl_dir` (fastcgi `DL_DIR`) needs to be set. location /anime/win/ { - set $dl_prefix /anime/win; - set $dl_root /srv/ftp; - alias $dl_root/; - try_files $uri @lister; + set $dl_dir $request_filename; + alias /srv/ftp/; + try_files $uri @lister; // try_files "" @lister if the alias is } -And you're done. Probably also works with apache but I have no idea how to setup it. +And done. Probably also works with apache but I have no idea how to set it up. + +Upgrading +--------- + +When upgrading from 1.0.0, update nginx config accordingly. License -------