annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
b6b65a5b9c1a Change readme title and add note for apache.
edogawaconan <me@myconan.net>
parents: 12
diff changeset
1 dirlist
b6b65a5b9c1a Change readme title and add note for apache.
edogawaconan <me@myconan.net>
parents: 12
diff changeset
2 =======
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
3
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
4 Using capability of nginx.
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
5
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
6 Basically, add this block
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
7
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 location @lister {
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
9 include fastcgi_params;
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
10 fastcgi_pass unix:/tmp/php-fcgi.sock;
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
11 uninitialized_variable_warn off;
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
12 fastcgi_param DL_DIR $dl_dir;
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
13 fastcgi_param SCRIPT_FILENAME /path/to/index.php;
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
14 }
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
15
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
16 (adjust the path to `index.php` and `php-fcgi`).
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
17
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
18 And whenever a directory needs to be autoindexed, add
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
19
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
20 location / {
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
21 try_files $uri @lister;
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
22 }
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
23
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
24 .
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
25
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
26 Note that if the directory is aliased, `$dl_dir` (fastcgi `DL_DIR`) needs to be set.
10
47a281c1d54e Update documentation to match current code.
edogawaconan <me@myconan.net>
parents: 1
diff changeset
27
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
28 location /anime/win/ {
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
29 set $dl_dir $request_filename;
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
30 alias /srv/ftp/;
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
31 try_files $uri @lister; // try_files "" @lister if the alias is
1
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
32 }
9ba6983b7c19 Copied readme from blog.
edogawaconan <me@myconan.net>
parents:
diff changeset
33
23
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
34 And done. Probably also works with apache but I have no idea how to set it up.
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
35
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
36 Upgrading
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
37 ---------
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
38
949398173ecb Much simpler setup with $request_filename.
edogawaconan <me@myconan.net>
parents: 13
diff changeset
39 When upgrading from 1.0.0, update nginx config accordingly.
12
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
40
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
41 License
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
42 -------
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
43
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
44 Copyright 2014 edogawaconan <me@myconan.net>
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
45
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
46 Permission to use, copy, modify, and/or distribute this software for any
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
47 purpose with or without fee is hereby granted, provided that the above
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
48 copyright notice and this permission notice appear in all copies.
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
49
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
50 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
51 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
52 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
53 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
54 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
55 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
37fad414ac29 Add license.
edogawaconan <me@myconan.net>
parents: 10
diff changeset
56 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.