comparison README.md @ 10:47a281c1d54e

Update documentation to match current code.
author edogawaconan <me@myconan.net>
date Tue, 21 Oct 2014 22:07:03 +0900
parents 9ba6983b7c19
children 37fad414ac29
comparison
equal deleted inserted replaced
9:5db51091e291 10:47a281c1d54e
4 Using capability of nginx. 4 Using capability of nginx.
5 5
6 Basically, add this block 6 Basically, add this block
7 7
8 location @lister { 8 location @lister {
9 include fastcgi_params;
9 fastcgi_pass unix:/tmp/php-fcgi.sock; 10 fastcgi_pass unix:/tmp/php-fcgi.sock;
10 fastcgi_param PREFIX $_list_prefix; 11 uninitialized_variable_warn off;
11 fastcgi_param FILE_ROOT $_list_root; 12 fastcgi_param DL_PREFIX $dl_root;
12 fastcgi_param SCRIPT_FILENAME /srv/http/index.php; 13 fastcgi_param DL_ROOT $dl_prefix;
13 include fastcgi_params; 14 fastcgi_param SCRIPT_FILENAME /path/to/index.php;
14 } 15 }
15 16
16 (adjust the path to `lister.php` and `php-fcgi`) 17 (adjust the path to `index.php` and `php-fcgi`)
17 18
18 And then whenever you want to autoindex a folder just add 19 And then whenever you want to autoindex a folder just add
19 20
21 location / {
22 try_files $uri @lister;
23 }
24
25 Note that if your directory is aliased, you need to set `$dl_prefix` (fastcgi `DL_PREFIX`) and `$dl_root` (fastcgi `DL_ROOT`).
26
20 location /anime/win/ { 27 location /anime/win/ {
21 set $_list_prefix /anime/win; 28 set $dl_prefix /anime/win;
22 set $_list_root /srv/ftp; 29 set $dl_root /srv/ftp;
23 alias $_list_root/; 30 alias $dl_root/;
24 try_files $uri @lister; 31 try_files $uri @lister;
25 } 32 }
26 33
27 And you're done. 34 And you're done.
28
29 The code needs some cleanups though.